Fix of compilation errros of SimpleGame.

This commit is contained in:
James Chen 2013-11-01 15:19:51 +08:00
parent ed10b92a60
commit a04d1acede
2 changed files with 6 additions and 3 deletions

View File

@ -100,7 +100,10 @@ bool HelloWorld::init()
this->schedule( schedule_selector(HelloWorld::gameLogic), 1.0 );
this->setTouchEnabled(true);
auto dispatcher = Director::getInstance()->getEventDispatcher();
auto listener = EventListenerTouchAllAtOnce::create();
listener->onTouchesEnded = CC_CALLBACK_2(HelloWorld::onTouchesEnded, this);
dispatcher->addEventListenerWithSceneGraphPriority(listener, this);
_targets = new Array();
_targets->init();

View File

@ -30,7 +30,7 @@ public:
void updateGame(float dt);
void onTouchesEnded(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event) override;
void onTouchesEnded(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
protected: