class EntityBoat
This commit is contained in:
parent
7a4373645a
commit
533756d814
16
EntityBoat.java
Normal file
16
EntityBoat.java
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import java.awt.*;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
public class EntityBoat {
|
||||||
|
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(40, 70) : weight;
|
||||||
|
BodyColor = bodyColor;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user