Package arc.input

Class InputDevice

java.lang.Object
arc.input.InputDevice
Direct Known Subclasses:
Controller, KeyboardDevice

public abstract class InputDevice extends Object
  • Constructor Details

    • InputDevice

      public InputDevice()
  • Method Details

    • postUpdate

      public void postUpdate()
      Called at the end of the update loop.
    • preUpdate

      public void preUpdate()
      Called at the start of the update loop.
    • name

      public abstract String name()
    • type

      public abstract InputDevice.DeviceType type()
    • isPressed

      public abstract boolean isPressed(KeyCode key)
      Returns:
      whether the button is currently pressed.
    • isTapped

      public abstract boolean isTapped(KeyCode key)
      Returns:
      whether button was pressed down this frame.
    • isReleased

      public abstract boolean isReleased(KeyCode key)
      Returns:
      whether this button was released this frame.
    • getAxis

      public abstract float getAxis(KeyCode keyCode)
      Returns:
      an axis tilt value, usually -1 to 1; 0 for non-axes.