Class StateMethodDelegate

java.lang.Object
com.simsilica.lemur.input.StateMethodDelegate
All Implemented Interfaces:
StateFunctionListener

public class StateMethodDelegate extends Object implements StateFunctionListener
A convenience StateFunctionListener implementation that can call a method using reflection. By default, the method is called on the "release" of a particular function, ie: when its state returns to Off. Methods that take an InputState argument and are called by a StateMethodDelegate with the "takesArgument" parameter as 'true' will receive all events, POSTIVE, Negative, and Off.
  • Constructor Details

    • StateMethodDelegate

      public StateMethodDelegate(Object target, String method)
    • StateMethodDelegate

      public StateMethodDelegate(Object target, String method, boolean takesArgument)
  • Method Details