Compare commits
2 Commits
7640caf855
...
5ee42860b1
Author | SHA1 | Date | |
---|---|---|---|
5ee42860b1 | |||
ccfa42bf48 |
3
.idea/.gitignore
vendored
Normal file
3
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
@ -37,7 +37,7 @@ public class DrawningAirFighter {
|
||||
EntityAirFighter.Init(speed, weight, bodyColor, engineNumb, racket, wing);
|
||||
|
||||
DrawningEngines = new DrawningEngines();
|
||||
DrawningEngines.Init(_airfighterWidth, _airfighterHeight,_startPosX,_startPosY,airfighterPanel);
|
||||
DrawningEngines.Init(_startPosX,_startPosY,airfighterPanel);
|
||||
Random rand = new Random();
|
||||
DrawningEngines.ChangeEnginesNumb(rand.nextInt(1, 4));
|
||||
return true;
|
||||
|
@ -8,13 +8,11 @@ public class DrawningEngines {
|
||||
JPanel AirFighterPanel;
|
||||
private NumberType EnginesNumb;
|
||||
private Color EngineColor;
|
||||
private int Width, Height;
|
||||
public int CurX, CurY;
|
||||
|
||||
|
||||
boolean Init(int width, int height, int curX, int curY, JPanel airfighterPanel){
|
||||
Width = width;
|
||||
Height = height;
|
||||
boolean Init( int curX, int curY, JPanel airfighterPanel){
|
||||
|
||||
CurX = curX;
|
||||
CurY = curY;
|
||||
EngineColor = Color.BLACK;
|
||||
@ -24,11 +22,11 @@ public class DrawningEngines {
|
||||
}
|
||||
|
||||
public void ChangeEnginesNumb(int x){
|
||||
if(x ==1)
|
||||
if(x <= 1)
|
||||
EnginesNumb = NumberType.Two;
|
||||
if(x == 2)
|
||||
EnginesNumb = NumberType.Four;
|
||||
if(x == 3)
|
||||
if(x >= 3)
|
||||
EnginesNumb = NumberType.Six;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user