30 lines
676 B
Java
30 lines
676 B
Java
|
import java.awt.*;
|
||
|
import java.util.*;
|
||
|
|
||
|
public class EntityAirBomber
|
||
|
{
|
||
|
private int Speed;
|
||
|
private float Weight;
|
||
|
private Color BodyColor;
|
||
|
private 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(40, 70) : weight;
|
||
|
BodyColor = bodyColor;
|
||
|
Step = Speed * 100 / Weight;
|
||
|
}
|
||
|
|
||
|
public int GetSpeed() { return Speed; }
|
||
|
|
||
|
public float GetWeight() {
|
||
|
return Weight;
|
||
|
}
|
||
|
|
||
|
public Color GetColor() { return BodyColor; }
|
||
|
|
||
|
public float GetStep() { return Step; }
|
||
|
}
|