PIbd-23_Starostin_I.K._Lain.../lainer/Lainer1/EntityLainer.cs

20 lines
594 B
C#

namespace ProjectLainer.Entities
{
public class EntityLainer
{
public int Speed { get; private set; }
public double Weight { get; private set; }
public Color BodyColor { get; private set; }
public double Step => (double)Speed * 100 / Weight;
public EntityLainer(int speed, double weight, Color bodyColor)
{
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
}
public void ChangeColor(Color bodyColor)
{
BodyColor = bodyColor;
}
}
}