2024-04-18 13:11:34 +04:00
|
|
|
|
|
2024-04-24 09:28:37 +04:00
|
|
|
|
namespace lab1.Entities;
|
2024-04-18 13:11:34 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Класс-сущность "Истребитель"
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
2024-04-24 09:28:37 +04:00
|
|
|
|
public class EntityFighter : EntityTrackedVehicle
|
2024-04-18 13:11:34 +04:00
|
|
|
|
{
|
2024-04-24 09:28:37 +04:00
|
|
|
|
|
2024-04-18 13:11:34 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Дополнительный цвет (для опциональных элементов)
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Color AdditionalColor { get; private set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Признак (опция) наличия ракет
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool Kovsh { get; private set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Признак (опция) наличия доп. крыльев
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool Otval { get; private set; }
|
2024-04-24 09:28:37 +04:00
|
|
|
|
|
2024-04-18 13:11:34 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Инициализация полей объекта-класса истребителя
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="speed">Скорость</param>
|
|
|
|
|
/// <param name="weight">>Вес истребителя</param>
|
|
|
|
|
/// <param name="bodyColor">Основной цвет</param>
|
|
|
|
|
/// <param name="additionalColor">Дополнительный цвет</param>
|
|
|
|
|
/// <param name="rockets">Признак наличия ракет</param>
|
|
|
|
|
/// <param name="extraWings">Признак наличия доп. крыльев</param>
|
|
|
|
|
|
2024-04-24 09:28:37 +04:00
|
|
|
|
public EntityFighter(int speed, double weight, Color bodyColor, Color additionalColor, bool rockets, bool extraWings) : base(speed, weight, bodyColor)
|
2024-04-18 13:11:34 +04:00
|
|
|
|
{
|
2024-04-24 09:28:37 +04:00
|
|
|
|
|
2024-04-18 13:11:34 +04:00
|
|
|
|
AdditionalColor = additionalColor;
|
|
|
|
|
Kovsh = rockets;
|
|
|
|
|
Otval = extraWings;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|