42 lines
754 B
C#
42 lines
754 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace AirFighter
|
|||
|
{
|
|||
|
internal class EntityAircraft
|
|||
|
{
|
|||
|
public int Speed
|
|||
|
{
|
|||
|
get;
|
|||
|
private set;
|
|||
|
}
|
|||
|
|
|||
|
public float Weight
|
|||
|
{
|
|||
|
get;
|
|||
|
private set;
|
|||
|
}
|
|||
|
|
|||
|
public Color BodyColor
|
|||
|
{
|
|||
|
get;
|
|||
|
private set;
|
|||
|
}
|
|||
|
|
|||
|
//=> оператор подобный return
|
|||
|
public float Step => Speed * 100 / Weight;
|
|||
|
|
|||
|
|
|||
|
public void Init(int speed, float weight, Color bodyColor)
|
|||
|
{
|
|||
|
Speed = speed;
|
|||
|
Weight = weight;
|
|||
|
BodyColor = bodyColor;
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|