2024-02-18 17:22:50 +04:00
|
|
|
|
namespace ProjectAirplaneWithRadar
|
2024-02-10 18:11:15 +04:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Класс-сущность "Самолет с радаром"
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class EntityAirplaneWithRadar
|
|
|
|
|
{
|
|
|
|
|
/// <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 Wheels { get; private set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-02-18 17:22:50 +04:00
|
|
|
|
/// Признак (опция) наличия ракеты
|
2024-02-10 18:11:15 +04:00
|
|
|
|
/// </summary>
|
2024-02-18 17:22:50 +04:00
|
|
|
|
public bool Rocket { get; private set; }
|
2024-02-10 18:11:15 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Шаг перемещения автомобиля
|
|
|
|
|
/// </summary>
|
|
|
|
|
public double Step => Speed * 100 / Weight;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-02-18 17:22:50 +04:00
|
|
|
|
/// Инициализация полей объекта-класса самолета с радаром
|
2024-02-10 18:11:15 +04:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="speed">Скорость</param>
|
2024-02-18 17:22:50 +04:00
|
|
|
|
/// <param name="weight">Вес</param>
|
2024-02-10 18:11:15 +04:00
|
|
|
|
/// <param name="bodyColor">Основной цвет</param>
|
|
|
|
|
/// <param name="additionalColor">Дополнительный цвет</param>
|
2024-02-18 17:22:50 +04:00
|
|
|
|
/// <param name="wheels">Шасси</param>
|
|
|
|
|
/// <param name="rocket">Ракета</param>
|
|
|
|
|
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool wheels, bool rocket)
|
2024-02-10 18:11:15 +04:00
|
|
|
|
{
|
|
|
|
|
Speed = speed;
|
|
|
|
|
Weight = weight;
|
|
|
|
|
BodyColor = bodyColor;
|
|
|
|
|
AdditionalColor = additionalColor;
|
|
|
|
|
Wheels = wheels;
|
2024-02-18 17:22:50 +04:00
|
|
|
|
Rocket = rocket;
|
2024-02-10 18:11:15 +04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|