bali33 Posted April 21, 2015 Share Posted April 21, 2015 Hi, I'm trying inside one of my game state to listen when the mouse/finger is moving. In order to achieve that I use the following code :game.input.enabled = true;game.input.moveCallback = this.onMouseMove;game.input.moveCallbackContext = this;But that way the onMouseMove function in my game state is never called - so I guess it's not the right way to do. What am'I doing wrong ? Thank you. Link to comment Share on other sites More sharing options...
stauzs Posted April 21, 2015 Share Posted April 21, 2015 game.input.moveCallbacks.push({ callback: function(){console.log("moving", arguments)}, context: window }); Link to comment Share on other sites More sharing options...
rich Posted April 21, 2015 Share Posted April 21, 2015 game.input.addMoveCallback(callback, context) Link to comment Share on other sites More sharing options...
bali33 Posted April 21, 2015 Author Share Posted April 21, 2015 Thank you ! Link to comment Share on other sites More sharing options...
Recommended Posts