You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.
zeh fernando edited this page May 5, 2015
·
4 revisions
First, include one of the build files inside your project. While this code is written in TypeScript, the final build of the library is in JavaScript.
<script src="key-action-binder.min.js"></script>
Then, anywhere in your game's setup block, create a KeyActionBinder instance.
var binder = new KeyActionBinder();
This is the only instance you need to have available, as it will be used when creating and evaluating the status of your input devices. You can create as many instances as you need, although it's unlikely you will need more than one of these at any time.
The next step will be [creating some bindings linking actions to your input devices](Using action bindings).