Interface EngineInputHandler

All Known Subinterfaces:
EngineInputListener, State
All Known Implementing Classes:
StateManager

public interface EngineInputHandler
Input handler methods.
Author:
Matthew Tropiano
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    onInputFlag(String code, boolean set)
    Handles a boolean input code setting.
    boolean
    onInputValue(String code, double value)
    Handles an input value change.
  • Method Details

    • onInputFlag

      boolean onInputFlag(String code, boolean set)
      Handles a boolean input code setting. This is best used for things like key presses and mouse buttons and anything else that has a semantically boolean state.

      This method is called if the previous input listeners did not handle this.

      Parameters:
      code - the input code.
      set - true if active, false if inactive.
      Returns:
      true if this method handled the call, false otherwise.
    • onInputValue

      boolean onInputValue(String code, double value)
      Handles an input value change. This is best used for things like axis changes, throttles, and whatever has a variable input value.

      This method is called if the previous input listeners did not handle this.

      Parameters:
      code - the input code.
      value - the value of the input.
      Returns:
      true if this method handled the call, false otherwise.