egret.Tween、egret.Ease


循環調用。只能設置boolean,不能設置循環次數。

egret.Tween.get(this,{loop:true}).wait(1000).call(()=>{
     console.log("循環調用");
})

 

每次改變時,調用onChange函數。發現Tween默認調用時間是20ms左右一次。

protected startCreateScene(): void {
    egret.Tween.get(this,{ onChange: this.onChange,onChangeObj:this}).to({x:100},1000);
}
    
private temp:number = 0;
private onChange(){
   var now = egret.getTimer();
   console.log(now- this.temp);  //20左右
   this.temp = now;
}

 

useTicks不知干什么的

egret.Tween.get(this,{ onChange: this.onChange,onChangeObj: this,useTicks:100}).to({x:100},1000);

 

egret.Ease

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM