I'm using Cocos2d-x and trying to detect touches in my HelloWorld project. Though I'm having no luck.
.h
class HelloWorld : public CCLayer{
private:
CCSpriteBatchNode * _batchNode;
CCSprite *_turkey;
virtual void ccTouchesBegan(cocos2d::CCSet* touches, cocos2d::CCEvent* event);
.ccp
void HelloWorld::ccTouchesBegan(cocos2d::CCSet* touches, cocos2d::CCEvent* event){
CCLog("this");
}
but the thing is that when I click the screen 'this' never shows up in the log. What am i missing here?
thanks!
Edit,
Im using this tutorial. http://www.raywenderlich.com/11338/cocos2d-x-for-ios-and-android-space-game
No memeber named 'sharedDispatcher'
in 'cocos2d::CCTouchDispatcher' when i ad it to my init(), in HelloWorld.cpp – Clerihew