2024-03-15 16:38:48 +04:00
|
|
|
|
namespace AntiAircraftGun.Entities;
|
2024-03-07 18:22:00 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Класс - сущность Бронированная машина
|
|
|
|
|
/// </summary>
|
2024-03-17 14:18:19 +04:00
|
|
|
|
public class EntityArmoredCar
|
2024-03-03 11:38:17 +04:00
|
|
|
|
{
|
|
|
|
|
/// <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>
|
2024-04-01 18:15:58 +04:00
|
|
|
|
/// Метод передачи цвета
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="color"></param>
|
|
|
|
|
public void setBodyColor(Color color)
|
|
|
|
|
{
|
|
|
|
|
BodyColor = color;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
2024-03-03 11:38:17 +04:00
|
|
|
|
/// Перемещение зенитной установки
|
|
|
|
|
/// </summary>
|
|
|
|
|
public double Step => Speed * 100 / Weight;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Конструктор сущности
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="speed"></param>
|
|
|
|
|
/// <param name="weight"></param>
|
|
|
|
|
/// <param name="bodyColor"></param>
|
2024-03-17 14:18:19 +04:00
|
|
|
|
public EntityArmoredCar(int speed, double weight, Color bodyColor)
|
2024-03-03 11:38:17 +04:00
|
|
|
|
{
|
|
|
|
|
Speed = speed;
|
|
|
|
|
Weight = weight;
|
|
|
|
|
BodyColor = bodyColor;
|
|
|
|
|
}
|
|
|
|
|
}
|