Displaying 1 to 4 from 4 results

unswitch - 🕹 A tiny event handler for Switch controllers!

  •    Javascript

Please note that it's not required to pass all button-functions to Unswitch and will only be executed when you provide them. You are able to use the buttons function to catch all button presses and implement your own logic using the provided data. The buttons function will always be executed when provided, even when the button is also passed as property. It's possible to connect up to two controllers at the same time. To make this work side is to be passed with either L (left) or R (right) for the controllers respectively. Calling unswitch.update() will check every button for a change in state. If a callback is provided the new state is passed along. The axis works in the same way, but instead of a boolean it will return a number from 0 to 8. Number 0 to 7 are for the joystick positions going clockwise, number 8 is used as default (center).

InputSystem - An efficient and versatile input system for Unity.

  •    CSharp

A new input system. NOTE: This system is still under active development and not yet stable. To run the project, you will need a beta of Unity 2018.2.

decoupled-input - Input handling for HTML5 games done right.

  •    Javascript

decoupled-input is a flexible and lightweight input controller for games that allows to separate input listeners for different devices from the actual input computing logic. This allows to change input bindings and devices without having to change the program logic; e.g. if the "fire" action was bound to the space key and it should later be bound to a mouse button, the change is only being made in the bindings configuration, and the game logic remains entirely unaffected.

boipushy - Input module for LÖVE

  •    Lua

You can create multiple input objects even though you can get by most of the time with just a single global one. If your game supports multiple players locally then it's probably a good idea to create a different input object for each player, although it's not necessary as long as bindings between players don't collide. The example above binds the '1' key to the 'print' action. This means that in our code we can check for the 'print' action being pressed with input:pressed('print'), for instance, and that function would return true on the frame that we pressed the '1' key on the keyboard. This layer of indirection between keyboard and action allows our gameplay focus to only speak in terms of actions, which means that it doesn't have to care about which method of input is being used or if the key bindings were changed to something else.