34 lines
914 B
Java
34 lines
914 B
Java
package ProjectStormtrooper;
|
|
|
|
import java.awt.*;
|
|
|
|
public class DrawingEnginesSimple implements IDrawingEngines {
|
|
private EnumEnginesCount _enumEnginesCount;
|
|
|
|
@Override
|
|
public void SetEnumEnginesCount(int enginesCount) {
|
|
for (EnumEnginesCount val : EnumEnginesCount.values()) {
|
|
if (val.count == enginesCount) {
|
|
this._enumEnginesCount = val;
|
|
return;
|
|
}
|
|
}
|
|
this._enumEnginesCount = EnumEnginesCount.Two;
|
|
}
|
|
|
|
@Override
|
|
public EnumEnginesCount GetEnumEnginesCount() {
|
|
return _enumEnginesCount;
|
|
}
|
|
|
|
@Override
|
|
public void DrawEngine(Graphics2D g2d, Color color, int x, int y, int w, int h) {
|
|
g2d.setColor(Color.WHITE);
|
|
g2d.fillRect(x, y, w, h);
|
|
g2d.setColor(Color.BLACK);
|
|
g2d.drawRect(x, y, w, h);
|
|
g2d.setColor(color);
|
|
g2d.fillRect(x, y, 6, h);
|
|
}
|
|
}
|