PIbd-21_Kouvshinoff_T._A._W.../laba1Loco/EntityLoco.java

42 lines
1.6 KiB
Java
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;
}
}