Common Input - Team-Innis/UtH-Engine GitHub Wiki

Common Input is special input which has behaves like Touch and Mouse inputs.

Best for simple cross-platform games.

Used via Input Singleton like all other inputs (uthInput.Common).

Features

  • Event()

    Current status of input

    • NONE = Not anything else.

    • STATIONARY = Screen is being touched or left mouse button is down but no movement is detected.

    • PRESS = Screen was quickly tapped or clicked.

    • DRAG = Like stationary but movement is being detected.

    • ZOOM_IN/OUT = Behaves like Pinch on Android or MouseWheel on Computer.

    • RELEASE = On windows release happens also with click. On android happens when finger is removed from screen. (without triggering tap)

  • Position()

    Returns current position of touch/mouse pointer or vector2.zero if Event is NONE.