I’ve written a simple library for recognizing gestures for cocos2d-x. Now I want to share it if anyone finds it helpful.
The classes are in C++ and platform independent, of course cocos2d-x is required. Currently, this lib works with cocos2d-x v3.x, but I think with some simple modifications, it can work with v2.x.
One suggestion I have is that instead of having a callback interface that you need to implement, use std::function for the callbacks, that way you can bind c functions, class members, or even lambda functions as a callback.
Hi,
this is an old post but I try:
I have found a problem with this code. I use this gesture recognition on game scene in game layer and in interface layer separatedly. When I try to return to menu scene I get an error “BAD…”
The autor of this code have same time to help me in this investigation?
Thanks
Hi, I have currently solved using the gesture code only in the interface and forwarding specific events to the game.
The project must finish as soon as possible, but as soon as I can I prepare the sample code with the error. Thank you!