PIbd-22_Isaeva_A.I._Airbus_.../Airbus/EntityAirbus.cs

43 lines
1.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AirBus
{
public class EntityAirBus
{
// Скорость
public int Speed { get; private set; }
// Вес
public double Weight { get; private set; }
// основной цвет
public Color BodyColor { get; private set; }
// доп. цвет
public Color AdditionalColor { get; private set; }
// наличие доп отсека для пассажиров
public bool IsCompartment { get; private set; }
// наличие доп двигателей
public bool IsAdditionalEngine { get; private set; }
// шаг перемещения
public double Step => (double)Speed * 100 / Weight;
public void Init (int speed, double weight, Color bodyColor, Color additionalColor, bool isCompartment, bool isAdditionalEngine)
{
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
AdditionalColor = additionalColor;
IsCompartment = isCompartment;
IsAdditionalEngine = isAdditionalEngine;
}
}
}