2022-11-07 00:26:51 +04:00
|
|
|
import java.awt.*;
|
|
|
|
|
|
|
|
public class DrawningTrackedVehicle extends DrawningTracktor {
|
|
|
|
public DrawningTrackedVehicle(int speed, float weight, Color bodyColor, int countRollers, Color dopColor, boolean bucket, boolean supports){
|
|
|
|
super(speed, weight, bodyColor, countRollers, 130, 87);
|
|
|
|
Tracktor = new EntityTrackedVehicle(speed, weight, bodyColor, dopColor, bucket, supports);
|
|
|
|
}
|
|
|
|
|
2022-11-21 21:34:45 +04:00
|
|
|
public DrawningTrackedVehicle(EntityTrackedVehicle entity, IDrawningRollers rollers) {
|
|
|
|
super(entity, rollers);
|
|
|
|
}
|
|
|
|
|
2022-11-07 00:26:51 +04:00
|
|
|
@Override
|
|
|
|
public void DrawTransport(Graphics2D g){
|
|
|
|
if (!(Tracktor instanceof EntityTrackedVehicle trackedVehicle))
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Color pen;
|
|
|
|
Color dopBrush = trackedVehicle.getDopColor();
|
|
|
|
if (trackedVehicle.getBucket())
|
|
|
|
{
|
|
|
|
pen = trackedVehicle.getDopColor();
|
|
|
|
g.setStroke(new BasicStroke(5));
|
|
|
|
g.setColor(pen);
|
|
|
|
g.drawLine((int)_startPosX + 1, (int)_startPosY + 90, (int)_startPosX + 15, (int)_startPosY + 70);
|
|
|
|
g.drawLine((int)_startPosX + 15, (int)_startPosY + 72, (int)_startPosX + 15, (int)_startPosY + 50);
|
|
|
|
g.drawLine((int)_startPosX + 15, (int)_startPosY + 52, (int)_startPosX + 10, (int)_startPosY + 45);
|
|
|
|
g.drawLine((int)_startPosX + 15, (int)_startPosY + 60, (int)_startPosX + 40, (int)_startPosY + 50);
|
|
|
|
g.setStroke(new BasicStroke(1));
|
|
|
|
}
|
|
|
|
_startPosX += 20;
|
|
|
|
_startPosY += 5;
|
|
|
|
super.DrawTransport(g);
|
|
|
|
_startPosX -= 20;
|
|
|
|
_startPosY -= 5;
|
|
|
|
if (trackedVehicle.getSupports())
|
|
|
|
{
|
|
|
|
pen = Color.BLACK;
|
|
|
|
g.setColor(dopBrush);
|
|
|
|
g.fillRect((int)_startPosX + 100, (int)_startPosY + 50, 10, 42);
|
|
|
|
g.setColor(pen);
|
|
|
|
g.drawRect((int)_startPosX + 100, (int)_startPosY + 50, 10, 42);
|
|
|
|
|
|
|
|
g.setColor(dopBrush);
|
|
|
|
g.fillRect((int)_startPosX + 90, (int)_startPosY + 82, 30, 10);
|
|
|
|
g.setColor(pen);
|
|
|
|
g.drawRect((int)_startPosX + 90, (int)_startPosY + 82, 30, 10);
|
|
|
|
|
|
|
|
g.setColor(dopBrush);
|
|
|
|
g.fillRect((int)_startPosX + 45, (int)_startPosY + 50, 10, 42);
|
|
|
|
g.setColor(pen);
|
|
|
|
g.drawRect((int)_startPosX + 45, (int)_startPosY + 50, 10, 42);
|
|
|
|
|
|
|
|
g.setColor(dopBrush);
|
|
|
|
g.fillRect((int)_startPosX + 35, (int)_startPosY + 82, 30, 10);
|
|
|
|
g.setColor(pen);
|
|
|
|
g.drawRect((int)_startPosX + 35, (int)_startPosY + 82, 30, 10);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|