22 lines
469 B
Java
22 lines
469 B
Java
|
import java.awt.*;
|
||
|
import java.util.Random;
|
||
|
|
||
|
class EntityAircraft
|
||
|
{
|
||
|
public int Speed;
|
||
|
public float Weight;
|
||
|
public Color BodyColor;
|
||
|
|
||
|
public float Step;
|
||
|
|
||
|
public void Init(int speed, float weight, Color bodyColor)
|
||
|
{
|
||
|
Random rnd = new Random();
|
||
|
|
||
|
Speed = speed <= 0 ? rnd.nextInt(50, 150) : speed;
|
||
|
Weight = weight <= 0 ? rnd.nextInt(50, 70) : weight;
|
||
|
BodyColor = bodyColor;
|
||
|
|
||
|
Step = Speed * 100 / Weight;
|
||
|
}
|
||
|
}
|