如题目,求解答,跪谢!!!!
我需要向schedule定时调用的方法传递参数,应当如何设置?
this.schedule(()=>{
// callback
}, 0.016, Infinity, 0);
https://docs.cocos.com/creator/2.4/api/zh/classes/Label.html#schedule
-
callback[function] 回调函数 -
interval[Number] 触发间隔 -
repeat[Number] 循环次数 -
delay[Number] 延迟时间 单位 秒
别人可能是想这样
let a = 0;
let b = 1;
this.schedule((a,b)=>{
cc.log(a,b) //1 2
}, 0.016, Infinity, 0);