Scheduler in Cocos2dx-airplay

Scheduler in Cocos2dx-airplay
0.0 0


Can anyone tell me what the alternative to

[self schedule:@selector(gameLogic:) interval:1.0];

is in Cocos2dx…

I used

bool HelloWorld::Init
    schedule(schedule_selector(HelloWorld::gameLogic), 0.5f);
void HelloWorld::gameLogic(ccTime dt)

The gameLogic function that I have coded Xcode gives an error that in the class HelloWorld.h ccTime is not declared
I tried including ccTypes.h but still no use.
Help :smiley:


ccTime is in the namespace of cocos2d.
Change the code in your HelloWorld.h from

void gameLogic(ccTime dt);


void gameLogic(cocos2d::ccTiime dt);

It will work.