+ 2
In web game developement, and in web applications in general, is eventListener the most efficient way to detect input?
2 Réponses
+ 4
Gordon Thanks. I wasn't sure if there were other ways. :)
+ 1
Of course.
What's more? You have to know which event listener based on your game design about the control.
The are click, mousedown, mouseup , touchdown, touchup, keydown , keyup,
You will need to declare the callback function with an argument so that this argument will be the event object containing mouse position of key details which you will use.