|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object components.KeyRegistry
public class KeyRegistry
KeyRegistry is a mutable object that stores the key triggers that the game should respond to.
keyTriggers
: set of Constructor Summary | |
---|---|
KeyRegistry()
|
Method Summary | |
---|---|
void |
clearDowns(GameObject obj)
clear all key down triggers assoc with this object |
void |
clearUps(GameObject obj)
clear all key up triggers assoc with this object |
Set<Integer> |
getAllDownKeys()
get all down key presses that are listened for |
Set<Integer> |
getAllUpKeys()
get all up key presses that are listened for |
Set<GameObject> |
getDown(int key)
|
Set<Integer> |
getDowns(GameObject obj)
|
Set<GameObject> |
getUp(int key)
|
Set<Integer> |
getUps(GameObject obj)
|
boolean |
registerDown(int key,
GameObject tgt)
|
boolean |
registerUp(int key,
GameObject tgt)
|
boolean |
remove(int key,
boolean down,
GameObject tgt)
remove the specified key press from the registry |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeyRegistry()
Method Detail |
---|
public boolean registerDown(int key, GameObject tgt)
public boolean registerUp(int key, GameObject tgt)
public Set<GameObject> getDown(int key)
public Set<GameObject> getUp(int key)
public Set<Integer> getDowns(GameObject obj)
public Set<Integer> getUps(GameObject obj)
public void clearDowns(GameObject obj)
public void clearUps(GameObject obj)
public Set<Integer> getAllDownKeys()
public Set<Integer> getAllUpKeys()
public boolean remove(int key, boolean down, GameObject tgt)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |