47 lines
1.7 KiB
Java
47 lines
1.7 KiB
Java
import java.awt.*;
|
|
public class DrawingAdvancedCruiser extends DrawingCruiser{
|
|
EntityAdvancedCruiser EntityCruiser;
|
|
public DrawingAdvancedCruiser(int speed, double weight, Color bodyColor, Color additionalColor, boolean helicopterPad, boolean coating, boolean ornamentWheels, int width, int height) {
|
|
super(speed, weight, bodyColor, width, height, 110, 60);
|
|
{
|
|
EntityCruiser = new EntityAdvancedCruiser(speed, weight, bodyColor, additionalColor, helicopterPad, coating);
|
|
}
|
|
}
|
|
public DrawingAdvancedCruiser(EntityAdvancedCruiser entityAdvancedCruiser, IDop wheels)
|
|
{
|
|
super(entityAdvancedCruiser, wheels);
|
|
{
|
|
EntityCruiser = entityAdvancedCruiser;
|
|
this.wheels = wheels;
|
|
}
|
|
}
|
|
public EntityAdvancedCruiser getentityAdvancedCruiser(){
|
|
return EntityCruiser;
|
|
}
|
|
public void DrawTransport(Graphics g)
|
|
{
|
|
EntityAdvancedCruiser advancedCruiser;
|
|
if (EntityCruiser == null )
|
|
{
|
|
return;
|
|
}
|
|
Color addBrush = EntityCruiser.AdditionalColor;
|
|
Color brush = EntityCruiser.BodyColor;
|
|
super.DrawTransport(g);
|
|
if (EntityCruiser.HelicopterPad)
|
|
{
|
|
g.setColor(addBrush);
|
|
g.drawRect(_startPosX + 35,
|
|
_startPosY + 23, 15, 15);
|
|
g.drawRect(_startPosX + 50,
|
|
_startPosY + 19, 30, 25);
|
|
}
|
|
if (EntityCruiser.Coating)
|
|
{
|
|
g.drawOval(_startPosX + 70,
|
|
_startPosY + 29, 20, 20);
|
|
}
|
|
if (wheels == null){return;}
|
|
wheels.drawWheels(g, _startPosX, _startPosY, brush);
|
|
}
|
|
} |