45 lines
1.5 KiB
Java
45 lines
1.5 KiB
Java
import java.awt.*;
|
|
|
|
public class DrawingAdvancedAirbus extends DrawingAirbus{
|
|
public DrawingAdvancedAirbus(int speed, float weight, Color bodyColor, Color extraColor, boolean superTurbine, boolean extraCell)
|
|
{
|
|
super(speed, weight, bodyColor, 145, 55);
|
|
Airbus = new EntityAdvancedAirbus(speed, weight, bodyColor, extraColor, superTurbine, extraCell);
|
|
}
|
|
@Override
|
|
public void DrawTransport(Graphics2D g)
|
|
{
|
|
if (Airbus instanceof EntityAdvancedAirbus)
|
|
{
|
|
EntityAdvancedAirbus advancedAirbus = (EntityAdvancedAirbus) Airbus;
|
|
|
|
if (advancedAirbus.SuperTurbine)
|
|
{
|
|
g.setColor(advancedAirbus.ExtraColor);
|
|
g.fillRect((int)_startPosX, (int)_startPosY + 20, 30, 22);
|
|
g.drawLine((int)_startPosX, (int)_startPosY + 42, (int)_startPosX + 30, (int)_startPosY + 42);
|
|
|
|
}
|
|
_startPosX += 10;
|
|
_startPosY += 5;
|
|
|
|
super.DrawTransport((Graphics2D)g);
|
|
|
|
_startPosX -= 10;
|
|
_startPosY -= 5;
|
|
if (advancedAirbus.ExtraCell)
|
|
{
|
|
g.setColor(advancedAirbus.ExtraColor);
|
|
g.fillRect((int)_startPosX + 55, (int)_startPosY + 15, 30, 10);
|
|
for (int i = (int)_startPosX + 57; i < (int)_startPosX + 83; i += 3)
|
|
{
|
|
g.setColor(Color.BLUE);
|
|
g.fillRect(i, (int)_startPosY + 20, 2, 2);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
}
|