PIBD-13_Fomichev_V.S._Simple_/AntiAircraftGun/EntityAntiAircraftGun.cs

59 lines
2.0 KiB
C#
Raw Normal View History

2024-02-21 17:00:14 +04:00
namespace AntiAircraftGun;
/// <summary>
/// Класс-сущность Зенитная установка
/// </summary>
public class EntityAntiAircraftGun
{ /// <summary>
/// Скорость
/// </summary>
public int Speed { get; private set; }
/// <summary>
/// Вес
/// </summary>
public double Weight { get; private set; }
/// <summary>
/// Основной цвет
/// </summary>
public Color BodyColor { get; private set; }
/// <summary>
/// Дополниетльный цвет
/// </summary>
public Color AdditionalColor { get; private set; }
/// <summary>
/// Наличие обвеса
/// </summary>
public bool BodyKit { get; private set; }
/// <summary>
/// Наличие башни
/// </summary>
public bool Tower { get; private set; }
/// <summary>
/// Наличие радара
/// </summary>
public bool Radar { get; private set; }
/// <summary>
/// Шаг перемещения гидросамолета
/// </summary>
public double Step => Speed * 100 / Weight;
/// <summary>
/// Инициализация полей объекта-класса гидросамолета
/// </summary>
/// <param name="speed">Скорость</param>
/// <param name="weight">Вес</param>
/// <param name="bodyColor">Основной цвет</param>
/// <param name="additionalColor">Дополнительный цвет</param>
/// <param name="bodyKit">Наличие обвеса</param>
/// <param name="tower">Наличие башни</param>
/// <param name="radar">Наличие радара</param>
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool bodyKit, bool tower, bool radar)
{
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
AdditionalColor = additionalColor;
BodyKit = bodyKit;
Tower = tower;
Radar = radar;
}
}