2023-10-18 12:33:39 +04:00
|
|
|
import java.awt.*;
|
|
|
|
|
2023-11-04 14:33:13 +04:00
|
|
|
public class DrawGasolineTanker extends DrawTanker {
|
2023-10-18 12:33:39 +04:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
2023-11-28 17:44:07 +04:00
|
|
|
public DrawGasolineTanker(int speed, double weight, Color bodyColor, Color additionalColor, boolean bodyKit, boolean wing, boolean sportLine, int width, int height, int wheelCount) {
|
|
|
|
super(speed, weight, bodyColor, width, height, wheelCount);
|
|
|
|
if (GasolineTanker != null) {
|
|
|
|
GasolineTanker = new GasolineTanker(speed, weight, bodyColor, additionalColor, bodyKit, wing, sportLine);
|
|
|
|
}
|
|
|
|
}
|
2023-11-04 14:33:13 +04:00
|
|
|
public DrawGasolineTanker(GasolineTanker tanker, int width, int height, IWheelDraw wheelMode)
|
|
|
|
{
|
|
|
|
super(tanker, width, height, wheelMode);
|
|
|
|
if (GasolineTanker != null)
|
|
|
|
GasolineTanker = tanker;
|
|
|
|
}
|
2023-10-18 12:33:39 +04:00
|
|
|
@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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|