網(wǎng)上有說用這樣的方法傳參 scheduler->schedule(CC_CALLBACK_1(HelloWorld::Move, this, pTarget), this, 0.9f, 1, 0.1, false, name);HelloWorld::Move(float f, Node* pTarget)確實可以 但是其中 scheduler->schedule的第4個參數(shù)1是指的調用次數(shù),api中的解釋是void Scheduler::schedule(const ccSchedulerFunc& callback, void *target, float interval, unsigned int repeat, float delay, bool paused, const std::string& key)也就是unsigned int repeat這個參數(shù)是執(zhí)行次數(shù),我想讓他無限次調用,而不是指定次數(shù),怎么弄
- 2 回答
- 0 關注
- 1325 瀏覽
添加回答
舉報
0/150
提交
取消