59 lines
2.0 KiB
C#
59 lines
2.0 KiB
C#
|
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;
|
|||
|
}
|
|||
|
}
|