PIbd-22_Aleikin_A.M._AirBom.../DrawRocketEngine.java

26 lines
822 B
Java

import java.awt.*;
public class DrawRocketEngine implements IDrawningEngines
{
private Engines numRocketEngines;
@Override
public void SetNumEngines(int i) { numRocketEngines = Engines.GetNumEngines(i); }
@Override
public void DrawningEngines(float _startPosX, float _startPosY, Graphics2D g2d, int _airBomberWidth, int _airBomberHeight)
{
switch(numRocketEngines)
{
case TwoEngines:
break;
case FourEngines:
g2d.fillRect((int)_startPosX + _airBomberWidth, (int)_startPosY + _airBomberHeight / 2 - 10, 20, 20);
break;
case SixEngines:
g2d.fillRect((int)_startPosX + _airBomberWidth, (int)_startPosY + _airBomberHeight / 2 - 10, 20, 20);
break;
}
}
}