Исправил класс доп прорисовки
This commit is contained in:
parent
27859f9317
commit
a15eaf4b35
@ -4,9 +4,7 @@ public enum CountEngines {
|
||||
Four(4),
|
||||
Six(6);
|
||||
private int Count;
|
||||
public int getCount() {
|
||||
return Count;
|
||||
}
|
||||
public int getCount() { return Count; }
|
||||
CountEngines(int num){
|
||||
this.Count = num;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ public class DrawningAirFighter {
|
||||
_pictureHeight = null;
|
||||
_startPosX = null;
|
||||
_startPosY = null;
|
||||
DrawningEngines = new DrawningEngines(EntityAirFighter);
|
||||
DrawningEngines = new DrawningEngines();
|
||||
Random random = new Random();
|
||||
int Count = 2 * random.nextInt(4);
|
||||
DrawningEngines.SetCountEngines(Count);
|
||||
|
@ -2,21 +2,16 @@ import java.awt.*;
|
||||
|
||||
public class DrawningEngines {
|
||||
private CountEngines CountEngines;
|
||||
public CountEngines getCountEngines() {
|
||||
return CountEngines;
|
||||
}
|
||||
|
||||
private EntityAirFighter EntityAirFighter;
|
||||
public void SetCountEngines(int countEngines) {
|
||||
for (CountEngines num : CountEngines.values()) {
|
||||
if (num.getCount() == countEngines) {
|
||||
CountEngines = num;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
public DrawningEngines(EntityAirFighter entityAirFighter) {
|
||||
EntityAirFighter = entityAirFighter;
|
||||
}
|
||||
|
||||
public void DrawEngines(Graphics2D g, Color color, int x, int y) {
|
||||
g.setColor(color);
|
||||
for (int i = CountEngines.getCount(); i > 0; i -= 2) {
|
||||
|
Loading…
Reference in New Issue
Block a user