2022-11-03 22:02:58 +04:00
|
|
|
import java.awt.*;
|
|
|
|
|
|
|
|
public class EntityPlane
|
|
|
|
{
|
|
|
|
public int Speed; //скорость
|
|
|
|
public int GetSpeed(){
|
|
|
|
return Speed;
|
|
|
|
}
|
|
|
|
|
|
|
|
public float Weight; //вес
|
|
|
|
public float GetWeight(){
|
|
|
|
return Weight;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Color CorpusColor; //цвет корпуса
|
|
|
|
public Color GetColor(){
|
|
|
|
return CorpusColor;
|
|
|
|
}
|
|
|
|
|
|
|
|
//шаг перемещения самолёта
|
|
|
|
public float GetStep(){
|
|
|
|
return Speed * 100 / Weight;
|
|
|
|
}
|
|
|
|
|
2022-11-03 23:34:20 +04:00
|
|
|
public EntityPlane(int speed, float weight, Color corpusColor)
|
2022-11-03 22:02:58 +04:00
|
|
|
{
|
|
|
|
Speed = speed;
|
|
|
|
Weight = weight;
|
|
|
|
CorpusColor = corpusColor;
|
|
|
|
}
|
2022-11-03 23:34:20 +04:00
|
|
|
}
|