CCTimer *timer = CCTimer::timerWithTarget(this,schedule_selector(CCMainView::helloWord),1);我想用cocos2d-x中的计时器,每1秒执行一次helloWord的方法,但是总是报错。刚接触cocos2d-x,有好多不明白的,希望知道的大侠们帮帮忙! helloWord我是这么写的。
void CCMainView::helloWord(CCTime dt)
{
CCLOG(“halloWord”);
}
总是报错,报错如下
error C2440: “类型转换”: 无法从“void (__thiscall CCMainView::* )(cocos2d::CCTime)”转换为“cocos2d::SEL_SCHEDULE”。
大神们,帮帮忙了。 谢谢了~~~