Class InputTrigger

java.lang.Object
com.ardor3d.input.logical.InputTrigger

public final class InputTrigger extends Object
Defines an action to be performed when a specific input condition is met.
  • Constructor Details

    • InputTrigger

      public InputTrigger(Predicate<TwoInputStates> condition, TriggerAction action)
      Construct a new InputTrigger with the given condition and action.
      Parameters:
      condition - the predicate to test for this trigger
      action - the action to take if the predicate returns true.
    • InputTrigger

      public InputTrigger(Predicate<TwoInputStates> condition, TriggerAction action, String id)
      Construct a new InputTrigger with the given condition and action.
      Parameters:
      condition - the predicate to test for this trigger
      action - the action to take if the predicate returns true.
      id - an id, useful for identifying this trigger for deregistration, etc.
  • Method Details

    • setId

      public void setId(String id)
      Parameters:
      id - the id to set. This id can be used to uniquely identify a trigger.
    • getId

      public String getId()
      Returns:
      the id set, or null if none was set.