42 lines
1.6 KiB
Java
42 lines
1.6 KiB
Java
package laba1Loco;
|
||
|
||
import java.awt.*;
|
||
import java.util.*;
|
||
import javax.swing.*;
|
||
import javax.swing.Timer;
|
||
import java.awt.event.*;
|
||
|
||
public class EntityLoco extends EntityTrain{
|
||
public Color AdditionalColor;
|
||
|
||
public void setAdditionalColor(Color color){AdditionalColor = color;}
|
||
/// <summary>
|
||
/// Признак (опция) наличия трубы
|
||
/// </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;
|
||
}
|
||
} |