I am developing a mobile game using coco2d-x framework with C++ language. The platforms I target are IOS and Android.
I want to run some code when an user is pressing a sprite as long as he doesn't release the press without moving the finger. I went through the documentations and looked at the different callbacks (onTouchBegan, onTouchMoved, onTouchEnded) but couldn't find a way to solve my problem.
In fact i have sprites drawn on the screen to simulate directional controller. I want to move a character as long as the user is pressing on a directional sprite.
Is there a way to run some code as long as a sprite is pressed ?