Обновленный класс-сущность «продвинутого» объекта

This commit is contained in:
malimova 2023-11-26 15:49:30 +04:00
parent 610206aade
commit 127a35dea6

View File

@ -6,21 +6,14 @@ using System.Threading.Tasks;
namespace AirBomber namespace AirBomber
{ {
public class EntityAirBomber public class EntityAirBomber : EntityAirPlane
{ {
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 Color AdditionalColor { get; private set; }
public bool Bombs { get; private set; } public bool Bombs { get; private set; }
public bool FuelTanks { get; private set; } public bool FuelTanks { get; private set; }
public int Engines { get; private set; } public int Engines { get; private set; }
public double Step => (double)Speed * 100 / Weight; public EntityAirBomber(int speed, double weight, Color bodyColor, Color additionalColor, bool bombs, bool fuelTanks, int engines) : base(speed, weight, bodyColor)
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool bombs, bool fuelTanks, int engines)
{ {
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
AdditionalColor = additionalColor; AdditionalColor = additionalColor;
Bombs = bombs; Bombs = bombs;
FuelTanks = fuelTanks; FuelTanks = fuelTanks;