|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.tudey.util.ActorAdvancer
com.threerings.tudey.util.MobileAdvancer
com.threerings.tudey.util.ActiveAdvancer
com.threerings.tudey.util.PawnAdvancer
public class PawnAdvancer
Used on the client and the server to advance the state of a pawn based on its inputs and surroundings.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.tudey.util.ActiveAdvancer |
|---|
ActiveAdvancer.Activity |
| Nested classes/interfaces inherited from class com.threerings.tudey.util.ActorAdvancer |
|---|
ActorAdvancer.Environment |
| Field Summary | |
|---|---|
protected InputFrame |
_frame
The most current input frame. |
protected Pawn |
_pawn
A casted reference to the pawn. |
protected Shape |
_swept
Holds the actor's swept shape. |
| Fields inherited from class com.threerings.tudey.util.ActiveAdvancer |
|---|
_active, _activities |
| Fields inherited from class com.threerings.tudey.util.MobileAdvancer |
|---|
_mobile, _otrans, _penetration, MAX_SUBSTEP |
| Fields inherited from class com.threerings.tudey.util.ActorAdvancer |
|---|
_actor, _environment, _shape, _timestamp, _transform |
| Constructor Summary | |
|---|---|
PawnAdvancer(ActorAdvancer.Environment environment,
Pawn pawn,
int timestamp)
Creates a new advancer for the supplied pawn. |
|
| Method Summary | |
|---|---|
void |
advance(InputFrame frame)
Advances to the timestamp of the provided input frame and sets the pawn's current input. |
protected boolean |
ignoreInputPosition()
Checks whether we should ignore the input position and instead perform the full movement simulation. |
void |
init(Actor actor,
int timestamp)
(Re)initializes the advancer. |
protected void |
step(float elapsed)
Takes an Euler step of the specified length. |
protected void |
takeSubsteps(float elapsed)
Executes the substeps required for the current step. |
protected void |
updateInput()
Updates the pawn's state based on the current input frame. |
protected void |
updateRotation()
Called to update a pawns rotation based on input. |
| Methods inherited from class com.threerings.tudey.util.ActiveAdvancer |
|---|
canMove, canRotate, getActivity, mobileStep |
| Methods inherited from class com.threerings.tudey.util.MobileAdvancer |
|---|
substep |
| Methods inherited from class com.threerings.tudey.util.ActorAdvancer |
|---|
advance, getActor, getTimestamp, jump, transfer, updateShape |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Pawn _pawn
protected InputFrame _frame
protected Shape _swept
| Constructor Detail |
|---|
public PawnAdvancer(ActorAdvancer.Environment environment,
Pawn pawn,
int timestamp)
| Method Detail |
|---|
public void advance(InputFrame frame)
public void init(Actor actor,
int timestamp)
ActorAdvancer
init in class ActiveAdvancerprotected void step(float elapsed)
ActorAdvancer
step in class ActiveAdvancerprotected void takeSubsteps(float elapsed)
MobileAdvancer
takeSubsteps in class MobileAdvancerprotected boolean ignoreInputPosition()
protected void updateInput()
protected void updateRotation()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||