|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.util.DeepObject
com.threerings.tudey.data.actor.Actor
com.threerings.tudey.data.actor.Mobile
com.threerings.tudey.data.actor.Active
com.threerings.tudey.data.actor.Agent
public class Agent
An autonomous agent controlled by the computer.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
com.threerings.io.Streamable.Closure |
| Field Summary | |
|---|---|
static int |
LAST_FLAG
The value of the last flag defined in this class. |
static int |
TURNING_LEFT
A flag indicating that the actor is turning left. |
static int |
TURNING_RIGHT
A flag indicating that the actor is turning right. |
| Fields inherited from class com.threerings.tudey.data.actor.Active |
|---|
LAST_ACTIVITY, NONE |
| Fields inherited from class com.threerings.tudey.data.actor.Mobile |
|---|
MOVING |
| Fields inherited from class com.threerings.tudey.data.actor.Actor |
|---|
WARP |
| Constructor Summary | |
|---|---|
Agent()
No-arg constructor for deserialization. |
|
Agent(ConfigReference<ActorConfig> config,
int id,
int created,
Vector2f translation,
float rotation)
Creates a new agent. |
|
| Method Summary | |
|---|---|
float |
getSpeed()
Returns the (base) speed of the actor. |
int |
getTurnDirection()
Returns the direction of rotation (+1 if counterclockwise, -1 if clockwise, 0 if none). |
float |
getTurnRate()
Returns the rate of turning (radians per second). |
void |
setSpeed(float speed)
Set the speed. |
void |
setTurnDirection(int dir)
Sets the turn direction. |
| Methods inherited from class com.threerings.tudey.data.actor.Active |
|---|
copy, createAdvancer, equals, getActivity, getActivityStarted, hashCode, interpolate, setActivity, setActivity, setActivityStarted |
| Methods inherited from class com.threerings.tudey.data.actor.Mobile |
|---|
addStepLimiter, extrapolate, getDirection, getMaxStep, getMaxStepSquared, removeStepLimiter, setDirection, setMaxStep, step |
| Methods inherited from class com.threerings.tudey.data.actor.Actor |
|---|
canCollide, canCollide, clear, getCollisionFlags, getCollisionMask, getConfig, getCreated, getDestroyed, getFlags, getId, getOriginal, getPreloads, getRotation, getTranslation, init, isClientControlled, isDirty, isSet, maybeCreateAdvancer, set, set, setConfig, setDestroyed, setDirty, setFlags, setRotation, setTranslation, toString |
| Methods inherited from class com.threerings.util.DeepObject |
|---|
clone, copy |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TURNING_LEFT
public static final int TURNING_RIGHT
public static final int LAST_FLAG
| Constructor Detail |
|---|
public Agent(ConfigReference<ActorConfig> config,
int id,
int created,
Vector2f translation,
float rotation)
public Agent()
| Method Detail |
|---|
public void setTurnDirection(int dir)
public float getSpeed()
Mobile
getSpeed in class Mobilepublic void setSpeed(float speed)
public int getTurnDirection()
Mobile
getTurnDirection in class Mobilepublic float getTurnRate()
Mobile
getTurnRate in class Mobile
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||