|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.jinx.action.input.ActionMap
public class ActionMap
Behavior implementation that maps input from an array of InputDevice objects
to Action objects, which are then processed by the encapsulating Participant.
API Stability: Beta.
Constructor Summary | |
---|---|
ActionMap()
Constructs a new ActionMap with no InputDevices and no associations. |
Method Summary | |
---|---|
void |
act(Participant p,
float dt)
Polls for input from the InputDevice attached to this ActionMap and then sends action data back to the calling Participant. |
void |
associate(ControlID id,
java.lang.String action)
Associates a control with an action. |
java.lang.String |
getAssociation(ControlID id)
Gets the association for id. |
void |
setInputDevices(InputDevice[] devices)
Sets the array of InputDevices to map from. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ActionMap()
Method Detail |
---|
public void setInputDevices(InputDevice[] devices)
devices
- the array.public void associate(ControlID id, java.lang.String action)
id
- the ControlID to use to obtain input.action
- the String specifying name of the action that should be
attached to the control. If this is null, it will remove any association
for id.public java.lang.String getAssociation(ControlID id)
id
- the controlID to get the associated action String for.public void act(Participant p, float dt)
act
in interface Behavior
p
- the Participant that needs a decision.dt
- the change in time value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |