Package fr.formiko.formiko
Class Blade
java.lang.Object
fr.formiko.usual.Point
fr.formiko.formiko.Blade
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
BladeGrass
,BladeMoss
,BladeSand
Vegetal blade is used to represent grass & moss on map.
- Author:
- Hydrolien
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate double
private static final int
private byte
private static Random
Fields inherited from class fr.formiko.usual.Point
x, y
-
Constructor Summary
ModifierConstructorDescriptionprotected
Blade
(int len) Main contructor with random direction & random location. -
Method Summary
Methods inherited from class fr.formiko.usual.Point
addX, addY, clone, equals, equals, getX, getY, setX, setY, toString
-
Field Details
-
angle
private double angle -
length
private byte length -
rand
-
avoidBorder
private static final int avoidBorder- See Also:
-
-
Constructor Details
-
Blade
protected Blade(int len) Main contructor with random direction & random location.
-
-
Method Details
-
newBlade
Return a new Blade of given type. -
length
public byte length() -
setLength
public void setLength(byte l) -
getColor
-
getThikness
public static int getThikness() -
draw
Main function that draw this on g.- Parameters:
g
- Graphics where to drawxOffset
- Case offset in xyOffset
- Case offset in y
-