public class Turning extends Effector
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_AMOUNT
Default amount.
|
static double |
DEFAULT_DIRECTION
Default direction.
|
static java.lang.String |
DEFAULT_LABEL
Default label.
|
static double |
LEFT
Direction value to turn left.
|
static double |
RIGHT
Direction value to turn right.
|
Constructor and Description |
---|
Turning(RotatingEntity parent,
java.lang.String label,
double direction)
Construct a turning effector.
|
Modifier and Type | Method and Description |
---|---|
double |
getAmount() |
double |
getDirection() |
java.lang.String |
getTypeDescription()
Short description of the effector type.
|
void |
setAmount(double amount) |
void |
setDirection(double direction) |
void |
update()
Move the agent in a manner appropriate to the effector type.
|
public static final double DEFAULT_DIRECTION
public static final double LEFT
public static final double RIGHT
public static final double DEFAULT_AMOUNT
public static final java.lang.String DEFAULT_LABEL
public Turning(RotatingEntity parent, java.lang.String label, double direction)
parent
- parent entity.label
- descriptive labeldirection
- amount turn in radians.public void update()
Effector
public double getAmount()
public void setAmount(double amount)
amount
- the amount to setpublic double getDirection()
public void setDirection(double direction)
direction
- the direction to setpublic java.lang.String getTypeDescription()
Effector
getTypeDescription
in class Effector