I have used
this->schedule(schedule_selector(MyNode::TickMe), 0, 0, 0);
to call a function whenever the player touches the screen.
But I want that as soon as the player stops touching the screen, the scheduled function also stops i.e. dont call the function TickMe anymore.
How can I achieve that?
EDIT:: Okay I got it. There is unschedule function available in CCNode. (Solved)
//unschedule the function.
unschedule(schedule_selector(MyNode::TickMe));