public class RobotPlayer extends Interval
Robot could have been used to post key
events to the target component rather than commands, but not all key
events can be simulated in that fashion (e.g., a right shift key
press), and this seemed somehow more proper in any case.Interval.Factory, Interval.RunBuddyRUN_DIRECT| Constructor and Description |
|---|
RobotPlayer(Component target,
com.threerings.util.KeyTranslator xlate)
Constructs a robot player.
|
| Modifier and Type | Method and Description |
|---|---|
void |
expired() |
boolean |
isActive()
Returns whether the robot is currently active and periodically
posting action commands.
|
void |
setActive(boolean active)
Sets whether the robot player is actively posting action commands.
|
void |
setRobotDelay(long delay)
Sets the delay in milliseconds between posting each action command.
|
public RobotPlayer(Component target, com.threerings.util.KeyTranslator xlate)
public void setActive(boolean active)
public void setRobotDelay(long delay)
public boolean isActive()
Copyright © 2015. All rights reserved.