fgui如何实现翻牌效果呢

已邀请:

谷主

赞同来自:

scale 从1变成-1

mdsrr2018

赞同来自:

大概是這種感覺, this 是牌本身
         fairygui.GTween.to(this.rotation, 360, 100)
              .setDuration(0.5)
              .setEase(fairygui.EaseType.ElasticInOut)
              .onUpdate((tween:fairygui.GTweener) => {
                  this.rotation = tween.value.x;
              }, this);
            fairygui.GTween.to(this.scaleX, 0, 100)
              .setDuration(0.25)
              .setEase(fairygui.EaseType.QuadInOut)
              .onUpdate((tween:fairygui.GTweener) => {
                  this.scaleX = tween.value.x;
              }, this)
              .onComplete(this.turnToFront, this);

要回复问题请先登录注册