CCNotificationCenter bug

CCNotificationCenter bug
0.0 0


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? (1.0 KB)


.h file


Your listener method needs to be receiving CCObject, not CCSprite. You can cast it to CCSprite inside if you need.