This library is designed to work with minimal setup by offering various callbacks and (optionally) initializing automatically.
This library makes client implement the InputHandler interface.
InputHandler methods:
* IsButtonPressed(Button) - "Is a certain button pressed?"
* GetAxisValues(Axis) - "Where are the gamepad analog sticks?"
* GetMouseScreenPosition() - "Where is the mouse relative to the camera?"
* GetMouseMapPosition() - "Where is the mouse relative to the world?"
* GetModifierMask() - "What modifier keys are currently being held?"
InputHandler events:
You can use EVENT_ADD(InputHandler.[some event], Object, Callback) so that when [some event] is fired, Object.Callback(...) is automatically called with the same arguments.
You can also override these events to add functionality to input handlers. Call ..() when you want to notify event listeners.
* ButtonPressed(InputHandler, Button)
* ButtonReleased(InputHandler, Button)
* AxisChanged(InputHandler, Axis, X, Y)
* MouseScrolled(InputHandler, DeltaX, DeltaY, Modifiers)
* MouseMoved(InputHandler, MoveX, MoveY)
Required libraries:
* Kaiochao.Directions
* Kaiochao.Enum
* Kaiochao.Event
Gamepad detection requires BYOND 511.
ID:2119464
Jul 20 2016, 10:00 pm
|
|