循環調用。只能設置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