2023-09-26 22:13:53 +04:00
|
|
|
|
package laba1Loco;
|
|
|
|
|
|
|
|
|
|
import java.awt.*;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import javax.swing.*;
|
|
|
|
|
import javax.swing.Timer;
|
|
|
|
|
import java.awt.event.*;
|
|
|
|
|
|
2023-10-08 01:10:54 +04:00
|
|
|
|
public class EntityLoco extends EntityTrain{
|
|
|
|
|
public Color AdditionalColor;
|
2023-11-06 17:23:00 +04:00
|
|
|
|
|
|
|
|
|
public void setAdditionalColor(Color color){AdditionalColor = color;}
|
2023-09-26 22:13:53 +04:00
|
|
|
|
/// <summary>
|
2023-10-08 01:10:54 +04:00
|
|
|
|
/// Признак (опция) наличия трубы
|
|
|
|
|
/// </summary>
|
|
|
|
|
public boolean Tube;
|
|
|
|
|
/// Признак (опция) наличия топливного бака
|
|
|
|
|
/// </summary>
|
|
|
|
|
public boolean FuelTank;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Признак (опция) наличия паровозной полосы
|
|
|
|
|
/// </summary>
|
|
|
|
|
public boolean LocoLine;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Инициализация полей объекта-класса Локомотива
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="speed">Скорость</param>
|
|
|
|
|
/// <param name="weight">Вес автомобиля</param>
|
|
|
|
|
/// <param name="bodyColor">Основной цвет</param>
|
|
|
|
|
/// <param name="additionalColor">Дополнительный цвет</param>
|
|
|
|
|
/// <param name="tube">Признак наличия трубы</param>
|
|
|
|
|
/// <param name="fuelTank">Признак наличия бака</param>
|
|
|
|
|
/// <param name="locoLine">Признак наличия паровозной полосы</param>
|
|
|
|
|
public EntityLoco(int speed, double weight, Color bodyColor, int _numWheel, Color additionalColor, boolean tube, boolean fuelTank, boolean locoLine)
|
|
|
|
|
{
|
|
|
|
|
super(speed, weight, bodyColor, _numWheel);
|
|
|
|
|
AdditionalColor = additionalColor;
|
|
|
|
|
Tube = tube;
|
|
|
|
|
FuelTank = fuelTank;
|
|
|
|
|
LocoLine = locoLine;
|
|
|
|
|
}
|
2023-09-26 22:13:53 +04:00
|
|
|
|
}
|