public class MotorBehavior extends SimpleBehavior
shouldYield
Constructor and Description |
---|
MotorBehavior()
Constructs a motor behavior
|
Modifier and Type | Method and Description |
---|---|
boolean |
claimsControl()
The motor behavior always claim control
|
void |
gainControl()
Effectively apply the power to the motor
|
int |
getPower()
Gets the power applied to the motor
|
int |
getPriority()
Priority is low (1)
|
void |
setPower(int power)
Sets the power to be applied by the motor
|
reset, yieldControl
public int getPower()
public void setPower(int power)
power
- the power to apply to the motorpublic boolean claimsControl()
public void gainControl()
public int getPriority()