I’ve read online that Ref * pSender is used as a pointer to an object that calls a function, but I haven’t been able to figure out how to use it.
Here’s an example. I create a UI Button here.
And this is the function that is run when the button is pressed;
void HelloWorld::onTouchEnded(cocos2d::Touch *touch, cocos2d::Event *event)
//Do stuff here
How would I use the Ref * pSender to get a pointer to the playButton object?