org.deken.game.input
Class Action

java.lang.Object
  extended by org.deken.game.input.Action
Direct Known Subclasses:
InputAction, InputMouseAction

public abstract class Action
extends java.lang.Object

Title: Action

Description:

Copyright: Copyright (c) Jun 12, 2014

Version:
1.0
Author:
Gary Deken

Nested Class Summary
static class Action.Behavior
          NORMAL: The normal behavior will return true as long as the input (key) is held down.
static class Action.State
           
 
Field Summary
protected  int amount
           
protected  Action.Behavior behavior
           
protected  boolean consumed
           
protected  int id
           
protected  Action.State state
           
 
Constructor Summary
Action()
           
 
Method Summary
abstract  void activate()
           
 void consumed()
           
abstract  void deactivate()
           
 int getId()
           
 boolean isActive()
          Returns whether this Input Action is activated or not.
 boolean isConsumed()
           
protected abstract  void notifyListeners()
           
 void setId(int id)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

amount

protected int amount

behavior

protected Action.Behavior behavior

consumed

protected boolean consumed

id

protected int id

state

protected Action.State state
Constructor Detail

Action

public Action()
Method Detail

activate

public abstract void activate()

deactivate

public abstract void deactivate()

getId

public int getId()

isActive

public boolean isActive()
Returns whether this Input Action is activated or not.

Returns:
boolean

setId

public void setId(int id)

notifyListeners

protected abstract void notifyListeners()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isConsumed

public boolean isConsumed()

consumed

public void consumed()