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