org.deken.game.movement
Class NoMovement

java.lang.Object
  extended by org.deken.game.movement.NoMovement
All Implemented Interfaces:
Movement, Updateable

public class NoMovement
extends java.lang.Object
implements Movement

Title: NoMovement

Description: This movement has no action. It is for an Actor that does not move.

Copyright: Copyright (c) Jan 21, 2012

Version:
1.0
Author:
Gary Deken

Field Summary
static NoMovement NO_MOVEMENT
           
 
Constructor Summary
NoMovement()
           
 
Method Summary
 void collideHorizontal()
          Collisions have no effect on this movement.
 void collideLayer()
          Collisions have no effect on this movement.
 void collideVertical()
          Collisions have no effect on this movement.
 Movement copy(Actor actor)
          Copies the movement.
 float getDirection()
          This returns the direction of the movement.
 GameVector getGameVector()
          This returns the current GameVector for this movement.
 java.lang.String getName()
           
 double getXUpdate()
          This returns the amount of X movement for a given update.
 double getYUpdate()
          This returns the amount of Y movement for a given update.
 void setName(java.lang.String name)
           
 void update(long elapseTime)
          This method takes the elapse time, since the last update, and to determine the next movement to set to the GameVector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_MOVEMENT

public static final NoMovement NO_MOVEMENT
Constructor Detail

NoMovement

public NoMovement()
Method Detail

collideHorizontal

public void collideHorizontal()
Collisions have no effect on this movement. The Actor remains stationary.

Specified by:
collideHorizontal in interface Movement

collideVertical

public void collideVertical()
Collisions have no effect on this movement. The Actor remains stationary.

Specified by:
collideVertical in interface Movement

collideLayer

public void collideLayer()
Collisions have no effect on this movement. The Actor remains stationary.

Specified by:
collideLayer in interface Movement

copy

public Movement copy(Actor actor)
Description copied from interface: Movement
Copies the movement.

Specified by:
copy in interface Movement
Returns:
Movement

getDirection

public float getDirection()
Description copied from interface: Movement
This returns the direction of the movement.

Specified by:
getDirection in interface Movement
Returns:
float

getGameVector

public GameVector getGameVector()
Description copied from interface: Movement
This returns the current GameVector for this movement.

Specified by:
getGameVector in interface Movement
Returns:
GameVector

getName

public java.lang.String getName()
Specified by:
getName in interface Updateable
Returns:

getXUpdate

public double getXUpdate()
Description copied from interface: Movement
This returns the amount of X movement for a given update.

Specified by:
getXUpdate in interface Movement
Returns:
double

getYUpdate

public double getYUpdate()
Description copied from interface: Movement
This returns the amount of Y movement for a given update.

Specified by:
getYUpdate in interface Movement
Returns:
double

setName

public void setName(java.lang.String name)

update

public void update(long elapseTime)
Description copied from interface: Movement
This method takes the elapse time, since the last update, and to determine the next movement to set to the GameVector.

Specified by:
update in interface Movement
Specified by:
update in interface Updateable
Parameters:
elapseTime - long