2024-03-03 16:22:55 +04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel.Design;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ProjectElectricLocomotive.Entities
|
|
|
|
|
{
|
|
|
|
|
public class EntityElectricLocomotive : EntityLocomotive
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Color AdditionalColor { get; private set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Признак (опция) "рогов"
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool Pantograph { get; private set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Признак (опция) наличия отсека под батареи
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool BatteryStorage { get; private set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Шаг перемещения Локомотива
|
|
|
|
|
/// </summary>
|
|
|
|
|
public double Step => Speed * 100 / Weight;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Инициализация полей объекта-класса ЭлектроЛокомотива
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="additionalColor">Дополнительный цвет</param>
|
|
|
|
|
/// <param name="pantograph">Признак "рогов"</param>
|
|
|
|
|
/// <param name="batteryStorage">Признак наличия отсека под батареи</param>
|
|
|
|
|
/// ------------------------------------------------------------------------------
|
|
|
|
|
/// Переписать!!!!!!!!!
|
|
|
|
|
/// САМИМ ТО ЧТО СНИЗУ!!!!!!!!!!!!!!!!!!
|
|
|
|
|
public EntityElectricLocomotive(int speed, double weight, Color bodyColor, Color additionalColor, bool pantograph
|
|
|
|
|
, bool batteryStorage) : base(speed, weight, bodyColor)
|
|
|
|
|
{
|
|
|
|
|
AdditionalColor = additionalColor;
|
|
|
|
|
Pantograph = pantograph;
|
|
|
|
|
BatteryStorage = batteryStorage;
|
|
|
|
|
}
|
2024-04-09 18:48:06 +04:00
|
|
|
|
internal void setAdditionalColor(Color additionalColor)
|
|
|
|
|
{
|
|
|
|
|
AdditionalColor = additionalColor;
|
|
|
|
|
}
|
2024-03-03 16:22:55 +04:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|