keyTracker documentation, mouse click support?
  • Two fold question, sorry.  I cant find anything about keyTracker anywhere in the documentation.

    What I'd really like to know, is how can I catch a mouse click?
  • selimselim
    Accepted Answer
    The keyTracker is just a way to access which key are pressed during a callback instead of through events. To enable it you just specify the option keyTracker: true in the .playground() function. Then at any moment you can simply use the array $.gameQuery.keyTracker to access the state of the keys, for example: since 65 is the keycode for 'a' you can check the value of $.gameQuery.keyTracker[65] and if it's true then the 'a' key is pressed!

    But no the mouse is not supported there, thought it is a very good idea and a simple one to implement, I will add it to the list of new feature for gQ 0.7!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!