Monica 请问一下,我为什么执行清楚了,没用了,定时器还在继续调用回调,并没有报错。this.StartToRound.on(Laya.Event.CLICK,null,function(){
Laya.timer.loop(10,this,round);//10ms 一秒100次
});
//转动逻辑
function round(){
tlate.rotation+=roundTurnChange(1);
console.log(tlate.rotation);
}
//转动变量变化
function roundTurnChange(type){
//减速阶段
roundTurn-=0.05;
if(roundTurn<=0.3){
console.log("*************************************************88");
Laya.timer.clear(this.tlate,round);
}
return roundTurn;
}