+ 2

In web game developement, and in web applications in general, is eventListener the most efficient way to detect input?

2nd Dec 2018, 12:15 AM
Nick
Nick - avatar
2 Antworten
+ 4
Gordon Thanks. I wasn't sure if there were other ways. :)
2nd Dec 2018, 1:15 AM
Nick
Nick - avatar
+ 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.
2nd Dec 2018, 1:08 AM
Gordon
Gordon - avatar