Please read code. The 67th line of HelloWorldScene.cpp is custom event. If i delete this line and direct call listener function , there’s nothing error.why?
HelloWorldScene.cpp.zip (1.0 KB)
Your listener method needs to be receiving CCObject, not CCSprite. You can cast it to CCSprite inside if you need.