28 lines
894 B
Java
28 lines
894 B
Java
import java.awt.*;
|
|
|
|
public class DrawingMotorShip extends DrawingShip {
|
|
public DrawingMotorShip(int speed, float weight, Color bodyColor, int decksCount, Color dopColor, boolean pipes, boolean fueltank) {
|
|
super(speed, weight, bodyColor, decksCount, 80, 50);
|
|
ship = new EntityMotorShip(speed, weight, bodyColor, dopColor, pipes, fueltank);
|
|
}
|
|
|
|
public DrawingMotorShip(EntityMotorShip entity, IDrawingDecks decks) {
|
|
super(entity, decks);
|
|
}
|
|
|
|
@Override
|
|
public void drawTransport(Graphics2D g) {
|
|
if (!(ship instanceof EntityMotorShip motorShip)) {
|
|
return;
|
|
}
|
|
|
|
g.setColor(motorShip.getDopColor());
|
|
if (motorShip.getPipes()) {
|
|
g.setStroke(new BasicStroke(8));
|
|
}
|
|
g.setStroke(new BasicStroke(6));
|
|
if (motorShip.getFuelTank()) {
|
|
}
|
|
super.drawTransport(g);
|
|
}
|
|
} |