54 lines
1.9 KiB
Java
54 lines
1.9 KiB
Java
import java.awt.*;
|
|
|
|
public class DrawningAirbus extends DrawningPlane{
|
|
|
|
public DrawningAirbus(int speed, float weight, Color bodyColor, Color dopColor, boolean bodyKit, boolean wing, boolean sportLine)
|
|
{
|
|
super(speed, weight, bodyColor, 140, 70);
|
|
Plane = new EntityAirbus(speed, weight, bodyColor, dopColor, bodyKit, wing, sportLine);
|
|
}
|
|
@Override
|
|
public void DrawTransport(Graphics g)
|
|
{
|
|
if (! (Plane instanceof EntityAirbus Airbus))
|
|
{
|
|
return;
|
|
}
|
|
super.paintComponent(g);
|
|
Graphics2D g2d = (Graphics2D) g;
|
|
g2d.setColor(Color.BLACK);
|
|
_startPosX += 10;
|
|
_startPosY += 5;
|
|
super.DrawTransport(g);
|
|
_startPosX -= 10;
|
|
_startPosY -= 5;
|
|
if (Airbus.BodyKit)
|
|
{
|
|
g.drawRect(_startPosX + 70, _startPosY + 50, 22, 16);
|
|
g.drawRect(_startPosX + 8, _startPosY + 18, 22, 16);
|
|
g.drawOval(_startPosX, _startPosY + 18, 16, 16);
|
|
g.drawOval(_startPosX + 62, _startPosY + 50, 16, 16);
|
|
|
|
g2d.setPaint(Airbus.DopColor);
|
|
g.fillRect(_startPosX + 70, _startPosY + 50, 22, 16);
|
|
g.fillOval(_startPosX + 84, _startPosY + 50, 16, 16);
|
|
g.fillOval(_startPosX + 24, _startPosY + 18, 16, 16);
|
|
g.fillRect(_startPosX + 8, _startPosY + 18, 22, 16);
|
|
|
|
g2d.setPaint(Color.BLACK);
|
|
g.fillOval(_startPosX, _startPosY + 18, 16, 16);
|
|
g.fillOval(_startPosX + 62, _startPosY + 50, 16, 16);
|
|
}
|
|
if (Airbus.Wing)
|
|
{
|
|
g.drawLine(_startPosX + 70, _startPosY + 20, _startPosX + 70, _startPosY + 35);
|
|
g.drawLine(_startPosX + 70, _startPosY + 20, _startPosX + 90, _startPosY + 35);
|
|
}
|
|
if (Airbus.SportLine)
|
|
{
|
|
g.drawOval(_startPosX + 110, _startPosY + 40, 9, 9);
|
|
g.fillOval(_startPosX + 110, _startPosY + 40, 9, 9);
|
|
}
|
|
}
|
|
}
|