Tutorial 4 : NSSet and UIEvent not in cocos2d namespace

It seems NSSet and UIEvent are not in the cocos2d namespace.

From tutorial # 4 - How to fire some bullets:

“Then we could receive the touch event now.
Declare the callback function”void ccTouchesEnded(cocos2d::NSSet* touches, cocos2d::UIEvent* event);" in HelloWorldScene.h, and realize the function in HelloWorldScene.cpp."

That function signature will not compile.

I got it to work using this instead:
void ccTouchesEnded(cocos2d::NSMutableSet* touches, cocos2d::CCEvent* event);

sorry, they’re renamed. NSSet > CCSet, UIEvent> CCEvent
Do this to avoid the name crash while you “using namespace cocos2d”

The wiki page is updated. Thanks for reminding me :slight_smile: