23 lines
608 B
Java
23 lines
608 B
Java
|
import java.awt.Color;
|
||
|
import java.util.Random;
|
||
|
|
||
|
public class EntityPlane {
|
||
|
private int Speed;
|
||
|
private float Weight;
|
||
|
private Color BodyColor;
|
||
|
|
||
|
public int getSpeed(){return Speed;}
|
||
|
public float getWeight(){return Weight;}
|
||
|
public Color getBodyColor(){return BodyColor;}
|
||
|
|
||
|
public float Step(){return Speed * 100 / Weight;}
|
||
|
|
||
|
public void Init(int speed, float weight, Color bodyColor)
|
||
|
{
|
||
|
Random rand = new Random();
|
||
|
if (speed <= 0) speed = rand.nextInt(350, 550);
|
||
|
if (weight <= 0) weight = rand.nextFloat(350, 550);
|
||
|
BodyColor = bodyColor;
|
||
|
}
|
||
|
}
|