|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.util.ShallowObject
com.threerings.tudey.server.logic.Logic
com.threerings.tudey.server.logic.ActorLogic
com.threerings.tudey.server.logic.MobileLogic
com.threerings.tudey.server.logic.ActiveLogic
com.threerings.tudey.server.logic.AgentLogic
public class AgentLogic
Controls an autonomous agent.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.ActorLogic |
|---|
ActorLogic.CollisionFlagObserver |
| Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.Logic |
|---|
Logic.ShapeObserver |
| Constructor Summary | |
|---|---|
AgentLogic()
|
|
| Method Summary | |
|---|---|
boolean |
canMove()
Checks whether we can move. |
boolean |
canRotate()
Checks whether we can rotate. |
boolean |
canThink()
Checks whether we can evaluate our behavior. |
void |
clearSpeed()
Clears a modified speed. |
void |
clearTargetRotation()
Clears the agent's target rotation. |
void |
clearTurnRate()
Clears the turn rate. |
BehaviorLogic |
createBehavior(ConfigReference<BehaviorConfig> ref)
Creates a behavior for this agent. |
void |
face(Logic logic)
Sets the target rotation to face another entity. |
void |
face(Logic logic,
boolean force)
Sets the target rotation to face another entity. |
Logic |
getBehaviorTarget()
Returns the logic currently being targeted by our behavior, if any. |
float |
getTargetRotation()
Returns the target rotation. |
void |
setSpeed(float speed)
Sets the speed. |
void |
setTargetRotation(float rotation)
Sets the target rotation for the agent to turn towards. |
void |
setTurnRate(float rate)
Sets the turn rate. |
void |
startMoving()
Sets the agent in motion. |
void |
stopMoving()
Stops the agent. |
boolean |
tick(int timestamp)
Ticks the participant. |
void |
transfer(Logic source,
Map<Object,Object> refs)
Transfers state from the specified source logic. |
| Methods inherited from class com.threerings.tudey.server.logic.ActiveLogic |
|---|
getActivityAdvance |
| Methods inherited from class com.threerings.tudey.server.logic.MobileLogic |
|---|
collides, getDirection, getPenetration, getSceneModel, getSnapshot, stepLimit |
| Methods inherited from class com.threerings.tudey.server.logic.ActorLogic |
|---|
addCollisionFlagObserver, addShapeObserver, bodyWillEnter, bodyWillLeave, destroy, getActivator, getActor, getCollisionFlags, getEntityKey, getModel, getPreviousSnapshot, getRotation, getShape, getShapeElement, getSnapshotDelta, getSource, getTags, getTranslation, init, isActive, isDefaultEntrance, isDestroyed, isRemoved, isStatic, move, remove, removeCollisionFlagObserver, removeShapeObserver, request, setActivator, setSource, setVariable, signal, warp, warp, warp |
| Methods inherited from class com.threerings.tudey.server.logic.Logic |
|---|
getPatrolPath, getSceneManager, getTransform, getTransform, getVariable, init, isVisible, resolveTarget |
| Methods inherited from class com.threerings.util.ShallowObject |
|---|
equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AgentLogic()
| Method Detail |
|---|
public boolean canMove()
public boolean canRotate()
public boolean canThink()
public Logic getBehaviorTarget()
public void face(Logic logic)
public void face(Logic logic,
boolean force)
public void setTargetRotation(float rotation)
public float getTargetRotation()
public void clearTargetRotation()
public void setTurnRate(float rate)
public void clearTurnRate()
public void setSpeed(float speed)
public void clearSpeed()
public void startMoving()
public void stopMoving()
public BehaviorLogic createBehavior(ConfigReference<BehaviorConfig> ref)
public void transfer(Logic source,
Map<Object,Object> refs)
Logic
transfer in class ActiveLogicpublic boolean tick(int timestamp)
TudeySceneManager.TickParticipant
tick in interface TudeySceneManager.TickParticipanttick in class ActiveLogictimestamp - the timestamp of the current tick.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||