• 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

  • 相关阅读:
    愚人节的礼物
    Image Transformation
    Rails
    Google Map
    Code Formatter
    ACboy needs your help again!
    Geek's Collection(幂运算)
    Train Problem I
    Beautiful Meadow
    Card Trick(模拟)
  • 原文地址:https://www.cnblogs.com/gamedaybyday/p/6244921.html
Copyright © 2020-2023  润新知