Package com.ardor3d.input.logical
Class InputTrigger
java.lang.Object
com.ardor3d.input.logical.InputTrigger
Defines an action to be performed when a specific input condition is met.
-
Constructor Summary
ConstructorDescriptionInputTrigger
(Predicate<TwoInputStates> condition, TriggerAction action) Construct a new InputTrigger with the given condition and action.InputTrigger
(Predicate<TwoInputStates> condition, TriggerAction action, String id) Construct a new InputTrigger with the given condition and action. -
Method Summary
-
Constructor Details
-
InputTrigger
Construct a new InputTrigger with the given condition and action.- Parameters:
condition
- the predicate to test for this triggeraction
- the action to take if the predicate returns true.
-
InputTrigger
Construct a new InputTrigger with the given condition and action.- Parameters:
condition
- the predicate to test for this triggeraction
- the action to take if the predicate returns true.id
- an id, useful for identifying this trigger for deregistration, etc.
-
-
Method Details
-
setId
- Parameters:
id
- the id to set. This id can be used to uniquely identify a trigger.
-
getId
- Returns:
- the id set, or null if none was set.
-