org.deken.game.movement
Class BaseMovement
java.lang.Object
org.deken.game.movement.BaseMovement
- All Implemented Interfaces:
- Movement, Updateable
- Direct Known Subclasses:
- FourKeyMovement, MouseDragMovement, SimpleMovement, ToCorner4Movement, ToTile4Movement, TwoKeyMovement, Wander8Movement
public abstract class BaseMovement
- extends java.lang.Object
- implements Movement
Title: BaseAnimation
Description: Base class for holding the GameVector and name.
Copyright: Copyright (c) Sep 26, 2014
- Version:
- 1.0
- Author:
- Gary Deken
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
gameVector
protected GameVector gameVector
name
protected java.lang.String name
BaseMovement
public BaseMovement()
baseCopy
protected void baseCopy(Movement newMovement)
getDirection
public float getDirection()
- This returns the direction from the GameVector.
- Specified by:
getDirection
in interface Movement
- Returns:
- float
getGameVector
public GameVector getGameVector()
- This returns the GameVector. It is recommended to use getDirection() for
getting the direction, instead of going through the GameVector, to insure
the GameVector is not changed outside of the Movement class.
- Specified by:
getGameVector
in interface Movement
- Returns:
- GameVector
getName
public java.lang.String getName()
- Specified by:
getName
in interface Updateable
- Returns:
setName
public void setName(java.lang.String name)