group1.model.gameobject
Class GameObjStates
java.lang.Object
group1.model.gameobject.GameObjStates
public class GameObjStates
- extends java.lang.Object
GameObjStates is a non-instantiable class that contains constants that assign
values to the various valid states of objects in the game. Add valid states
to the game by introducing new constants to this class, FOLLOWING THE RULES
documented in the non-Javadoc that appears in the source code.
Traverse through all possible states by incrementing an integer from 0 to
GameObjStates.NUMBER_OF_STATES - 1.
Method Summary |
static boolean |
isValidState(int state)
Returns true if the given value indexes a valid state, else false. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STATE_UNDEFINED
public static final int STATE_UNDEFINED
- The default state is undefined.
- See Also:
- Constant Field Values
STANDING
public static final int STANDING
- See Also:
- Constant Field Values
WALKING
public static final int WALKING
- See Also:
- Constant Field Values
RUNNING
public static final int RUNNING
- See Also:
- Constant Field Values
SKIDDING
public static final int SKIDDING
- See Also:
- Constant Field Values
RISING
public static final int RISING
- See Also:
- Constant Field Values
FALLING
public static final int FALLING
- See Also:
- Constant Field Values
DUCKING
public static final int DUCKING
- See Also:
- Constant Field Values
ATTACKING_BY_FIRE
public static final int ATTACKING_BY_FIRE
- See Also:
- Constant Field Values
ATTACKING_BY_KATANA
public static final int ATTACKING_BY_KATANA
- See Also:
- Constant Field Values
ATTACKING_BY_TOMAHAWK
public static final int ATTACKING_BY_TOMAHAWK
- See Also:
- Constant Field Values
ATTACKING_BY_LASER
public static final int ATTACKING_BY_LASER
- See Also:
- Constant Field Values
ATTACKING_BY_CONTACT
public static final int ATTACKING_BY_CONTACT
- See Also:
- Constant Field Values
DYING
public static final int DYING
- See Also:
- Constant Field Values
NUMBER_OF_STATES
public static final int NUMBER_OF_STATES
- This constant specifies the number of valid states;
IT IS NOT ITSELF A VALID STATE.
Traverse through all possible states by incrementing an integer
from 0 (STATE_UNDEFINED) to NUMBER_OF_STATES-1.
- See Also:
- Constant Field Values
GameObjStates
public GameObjStates()
isValidState
public static boolean isValidState(int state)
- Returns true if the given value indexes a valid state, else false.