|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT> cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule<UT2004Bot> cz.cuni.amis.pogamut.ut2004.bot.command.BotCommands cz.cuni.amis.pogamut.ut2004.bot.command.SimpleLocomotion
public class SimpleLocomotion
Class providing Pogamut2 UT2004 simple locomotion commands for the bot - basic movement and turning.
Field Summary |
---|
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule |
---|
act, worldView |
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
---|
agent, controller, eventBus, log |
Constructor Summary | |
---|---|
SimpleLocomotion(UT2004Bot agent,
java.util.logging.Logger log)
Constructor. |
Method Summary | |
---|---|
void |
jump()
Bot will make simple jump (Issues GB JUMP command) |
void |
moveTo(ILocated location)
Bot will move to supplied location. |
void |
setRun()
Sets the running speed for the bot movement commands. |
void |
setWalk()
Sets the walking speed for the bot movement commands. |
void |
stopMovement()
Makes the bot to stop all movement or turning. |
void |
turnHorizontal(int amount)
Rotates the bot by the supported amount (in degrees) in left/right direction (issues GB ROTATE command) |
void |
turnTo(ILocated location)
Bot will turn to face supported location (issues GB TURNTO command) |
void |
turnTo(Item item)
Bot will turn to face 'item' (isseus GB TURNTO command), the bot will face the item even if it or the item moves. |
void |
turnTo(Player player)
Bot will turn to face 'player' (isseus GB TURNTO command), the bot will face the player even if it or the player moves. |
void |
turnVertical(int amount)
Rotates the bot by the supported amount (in degrees) in up/down direction (issues GB ROTATE command) |
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
---|
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SimpleLocomotion(UT2004Bot agent, java.util.logging.Logger log)
agent
- AbstractUT2004Bot we will send commands forlog
- Logger to be used for logging runtime/debug info.Method Detail |
---|
public void moveTo(ILocated location)
locatedTarget
- Object with location. We will move to this location.stopMovement()
public void stopMovement()
moveTo(ILocated)
public void turnTo(ILocated location)
location
- Location we will face.turnHorizontal(int)
,
turnVertical(int)
public void turnTo(Player player)
player
- Player we will face.public void turnTo(Item item)
item
- Item we will face.public void turnHorizontal(int amount)
amount
- Amount of rotation in degrees.turnVertical(int)
,
turnTo(ILocated)
public void turnVertical(int amount)
amount
- Amount of rotation in degrees.turnHorizontal(int)
,
turnTo(ILocated)
public void jump()
public void setWalk()
setRun()
public void setRun()
setWalk()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |