30 lines
1.3 KiB
Java
30 lines
1.3 KiB
Java
|
import java.awt.*;
|
||
|
|
||
|
public class DrawGasolineTanker extends DrawingTanker {
|
||
|
public DrawGasolineTanker(int speed, double weight, Color bodyColor, Color additionalColor, boolean bodyKit, boolean wing, boolean sportLine, int width, int height, int wheelCount, int wheelMode) {
|
||
|
super(speed, weight, bodyColor, width, height, wheelCount, wheelMode);
|
||
|
if (GasolineTanker != null) {
|
||
|
GasolineTanker = new GasolineTanker(speed, weight, bodyColor, additionalColor, bodyKit, wing, sportLine);
|
||
|
}
|
||
|
}
|
||
|
@Override
|
||
|
public void DrawTransport(Graphics g) {
|
||
|
if (!(GasolineTanker instanceof GasolineTanker)) {
|
||
|
return;
|
||
|
}
|
||
|
super.DrawTransport(g);
|
||
|
g.setColor(((GasolineTanker) GasolineTanker).GetAdditionalColor());
|
||
|
if (((GasolineTanker) GasolineTanker).GetBodyKit()) {
|
||
|
g.fillOval(10 + _startPosX, 10 + _startPosY, 70, 30);
|
||
|
}
|
||
|
if (((GasolineTanker) GasolineTanker).GetSportLine()) {
|
||
|
g.fillRect(15 + _startPosX, 45 + _startPosY, 20, 5);
|
||
|
g.fillRect(40 + _startPosX, 45 + _startPosY, 20, 5);
|
||
|
g.fillRect(65 + _startPosX, 45 + _startPosY, 20, 5);
|
||
|
}
|
||
|
if (((GasolineTanker) GasolineTanker).GetWing()) {
|
||
|
g.fillRect(87 + _startPosX, 5 + _startPosY, 5, 5);
|
||
|
}
|
||
|
}
|
||
|
}
|