最近刚入坑cocos(对于一个之前做了六年页游的我来说,应该没什么难度,^_^)听说schedule定时器使用的时候,在web端使用没问题,但是在原生开发中会有坑。
(# ̄~ ̄#),我再想能不能用另外的方式去实现计时器呢?
看官方的API,发然了一个很好用的函数cc.repeat();
O(∩_∩)O哈哈~,欣喜若狂
然后开始动手写测试代码,核心逻辑:
/**
* @author Maniac.guo
* Everyone should have a dream , what if it came true ?
* @className FuncUtil
* @data 2018-4-14
* @mailbox 309506117@qq.com
*/
export namespace FuncUtil {
export function setTimeOut(callback:Function, delayTime:number, node