javoids
Enum KeyMap.Action

java.lang.Object
  extended by java.lang.Enum<KeyMap.Action>
      extended by javoids.KeyMap.Action
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<KeyMap.Action>
Enclosing class:
KeyMap

public static enum KeyMap.Action
extends java.lang.Enum<KeyMap.Action>

A list of possible actions that can be mapped to key presses in the game.

Author:
mallette

Enum Constant Summary
ACTION_AFTERBURNER
          use the afterburner
ACTION_BOMB1
          use a bomb
ACTION_BOMB2
          use a bomb to destroy everything (except the player)
ACTION_CYCLE_LEFT
          cycle through weapons going left
ACTION_CYCLE_RIGHT
          cycle through weapons going right
ACTION_ESCAPE
          escape from the menu
ACTION_FIRE
          fire the player's gun
ACTION_FLIP
          flip the player to face the opposite direction
ACTION_JUMP
          use the jump
ACTION_MENU
          bring up the menu
ACTION_NEWGAME
          start a new game
ACTION_PACMAN
          begin/end a pacman game of javoids
ACTION_PAUSE
          pause the game
ACTION_SELECT_WEAPON_01
          select the #01 weapon (always available)
ACTION_SELECT_WEAPON_02
          select the #02 weapon (if available -- count > 0)
ACTION_SELECT_WEAPON_03
          select the #03 weapon (if available -- count > 0)
ACTION_SELECT_WEAPON_04
          select the #04 weapon (if available -- count > 0)
ACTION_SELECT_WEAPON_05
          select the #05 weapon (if available -- count > 0)
ACTION_SELECT_WEAPON_06
          select the #06 weapon (if available -- count > 0)
ACTION_SELECT_WEAPON_07
          select the #07 weapon (if available -- count > 0)
ACTION_SELECT_WEAPON_08
          select the #08 weapon (if available -- count > 0)
ACTION_SELECT_WEAPON_09
          select the #09 weapon (if available -- count > 0)
ACTION_SELECT_WEAPON_10
          select the #10 weapon (if available -- count > 0)
ACTION_SELECT_WEAPON_11
          select the #11 weapon (if available -- count > 0)
ACTION_SELECT_WEAPON_12
          select the #12 weapon (if available -- count > 0)
ACTION_SELECT_WEAPON_13
          select the #13 weapon (if available -- count > 0)
ACTION_SELECT_WEAPON_14
          select the #14 weapon (if available -- count > 0)
ACTION_SELECT_WEAPON_BEST
          select the best weapon
ACTION_SHIELD
          use the shield
ACTION_THRUST
          use thrust
ACTION_TURN_LEFT
          turn left
ACTION_TURN_RIGHT
          turn right
ACTION_UNKNOWN
          a placeholder action for when no action is selected
 
Method Summary
static KeyMap.Action valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static KeyMap.Action[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ACTION_UNKNOWN

public static final KeyMap.Action ACTION_UNKNOWN
a placeholder action for when no action is selected


ACTION_THRUST

public static final KeyMap.Action ACTION_THRUST
use thrust


ACTION_TURN_LEFT

public static final KeyMap.Action ACTION_TURN_LEFT
turn left


ACTION_TURN_RIGHT

public static final KeyMap.Action ACTION_TURN_RIGHT
turn right


ACTION_CYCLE_LEFT

public static final KeyMap.Action ACTION_CYCLE_LEFT
cycle through weapons going left


ACTION_CYCLE_RIGHT

public static final KeyMap.Action ACTION_CYCLE_RIGHT
cycle through weapons going right


ACTION_FIRE

public static final KeyMap.Action ACTION_FIRE
fire the player's gun


ACTION_FLIP

public static final KeyMap.Action ACTION_FLIP
flip the player to face the opposite direction


ACTION_SHIELD

public static final KeyMap.Action ACTION_SHIELD
use the shield


ACTION_AFTERBURNER

public static final KeyMap.Action ACTION_AFTERBURNER
use the afterburner


ACTION_JUMP

public static final KeyMap.Action ACTION_JUMP
use the jump


ACTION_BOMB1

public static final KeyMap.Action ACTION_BOMB1
use a bomb


ACTION_BOMB2

public static final KeyMap.Action ACTION_BOMB2
use a bomb to destroy everything (except the player)


ACTION_SELECT_WEAPON_BEST

public static final KeyMap.Action ACTION_SELECT_WEAPON_BEST
select the best weapon


ACTION_SELECT_WEAPON_01

public static final KeyMap.Action ACTION_SELECT_WEAPON_01
select the #01 weapon (always available)


ACTION_SELECT_WEAPON_02

public static final KeyMap.Action ACTION_SELECT_WEAPON_02
select the #02 weapon (if available -- count > 0)


ACTION_SELECT_WEAPON_03

public static final KeyMap.Action ACTION_SELECT_WEAPON_03
select the #03 weapon (if available -- count > 0)


ACTION_SELECT_WEAPON_04

public static final KeyMap.Action ACTION_SELECT_WEAPON_04
select the #04 weapon (if available -- count > 0)


ACTION_SELECT_WEAPON_05

public static final KeyMap.Action ACTION_SELECT_WEAPON_05
select the #05 weapon (if available -- count > 0)


ACTION_SELECT_WEAPON_06

public static final KeyMap.Action ACTION_SELECT_WEAPON_06
select the #06 weapon (if available -- count > 0)


ACTION_SELECT_WEAPON_07

public static final KeyMap.Action ACTION_SELECT_WEAPON_07
select the #07 weapon (if available -- count > 0)


ACTION_SELECT_WEAPON_08

public static final KeyMap.Action ACTION_SELECT_WEAPON_08
select the #08 weapon (if available -- count > 0)


ACTION_SELECT_WEAPON_09

public static final KeyMap.Action ACTION_SELECT_WEAPON_09
select the #09 weapon (if available -- count > 0)


ACTION_SELECT_WEAPON_10

public static final KeyMap.Action ACTION_SELECT_WEAPON_10
select the #10 weapon (if available -- count > 0)


ACTION_SELECT_WEAPON_11

public static final KeyMap.Action ACTION_SELECT_WEAPON_11
select the #11 weapon (if available -- count > 0)


ACTION_SELECT_WEAPON_12

public static final KeyMap.Action ACTION_SELECT_WEAPON_12
select the #12 weapon (if available -- count > 0)


ACTION_SELECT_WEAPON_13

public static final KeyMap.Action ACTION_SELECT_WEAPON_13
select the #13 weapon (if available -- count > 0)


ACTION_SELECT_WEAPON_14

public static final KeyMap.Action ACTION_SELECT_WEAPON_14
select the #14 weapon (if available -- count > 0)


ACTION_PAUSE

public static final KeyMap.Action ACTION_PAUSE
pause the game


ACTION_ESCAPE

public static final KeyMap.Action ACTION_ESCAPE
escape from the menu


ACTION_MENU

public static final KeyMap.Action ACTION_MENU
bring up the menu


ACTION_NEWGAME

public static final KeyMap.Action ACTION_NEWGAME
start a new game


ACTION_PACMAN

public static final KeyMap.Action ACTION_PACMAN
begin/end a pacman game of javoids

Method Detail

values

public static final KeyMap.Action[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(KeyMap.Action c : KeyMap.Action.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static KeyMap.Action valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name