|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PhysicsModule
is an interface that defines the method for
moving an entity through the environment. Implementation will define how
the position and angle of the entity is affected per round. Calling
update
will set the physics attributes of the entity, such as
the newest angle and velocity. Where updatePosition
will set
the new position of the entity.
Method Summary | |
float |
getCurrentAngle()
getCurrentAngle returns the current angle of the entity as
defined by the physics module. |
float |
getCurrentTurningVel()
getCurrentTurningVel returns the current turning velocity
of the entity as defined by the physics module. |
float |
getCurrentVelocity()
getCurrentVelocity returns the current velocity of the
entity as defined by the physics module. |
void |
move(float moveScalar)
move moves the entity in the way defined by the
implementation of PhysicsModule . |
void |
strafe(float strafeScalar)
strafe strafes the entity in the way defined by the
implementation of PhysicsModule . |
void |
turn(float turnScalar)
turn turns the entity in the way defined by the
implementation of PhysicsModule . |
void |
update(float time)
update should update any physical attributes of the entity. |
void |
updatePosition(Vector position)
updatePosition sets the position (supplied as a parameter)
to the new position defined by the module's attributes. |
Method Detail |
public void update(float time)
update
should update any physical attributes of the entity.
time
- the time between updates.public void updatePosition(Vector position)
updatePosition
sets the position (supplied as a parameter)
to the new position defined by the module's attributes.
position
- the position to set.public void turn(float turnScalar)
turn
turns the entity in the way defined by the
implementation of PhysicsModule
.
turnScalar
- any scalar to the turning properties of the entity.public void move(float moveScalar)
move
moves the entity in the way defined by the
implementation of PhysicsModule
.
moveScalar
- any scalar to the movement properties of the entity.public void strafe(float strafeScalar)
strafe
strafes the entity in the way defined by the
implementation of PhysicsModule
.
strafeScalar
- any scalar to the strafe properties of the entity.public float getCurrentAngle()
getCurrentAngle
returns the current angle of the entity as
defined by the physics module.
public float getCurrentVelocity()
getCurrentVelocity
returns the current velocity of the
entity as defined by the physics module.
public float getCurrentTurningVel()
getCurrentTurningVel
returns the current turning velocity
of the entity as defined by the physics module.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |