網上有說用這樣的方法傳參 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個參數1是指的調用次數,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這個參數是執行次數,我想讓他無限次調用,而不是指定次數,怎么弄
- 2 回答
- 0 關注
- 1326 瀏覽
添加回答
舉報
0/150
提交
取消