2013年5月2日
摘要: schedule是CCNode的成员函数,作用是任务调度。即每隔一段时间调用一次方法。在很多情况下,你需要节点调用指定的更新方法以处理某些情况,比如碰撞检测。一、scheduleUpdate 1 - (id)init { 2 if (self=[super init]) { 3 [self scheduleUpdate]; //此方法会每一帧调用一次update:方法 4 } 5 } 6 7 // 重载CCNode的update:方法 8 // delta参数表示此方法的最后一次调用到现在所经过的时间 9 - (void)update:(ccTime)delt... 阅读全文
posted @ 2013-05-02 16:27 蓝易 阅读(536) 评论(0) 推荐(0) 编辑