Beispiel #1
0
 public void Play(Window.AnimationCompleteHandler callback)
 {
     if (!this.reverse)
     {
         if (!this.keepOriginal)
         {
             this.window.scale = new Vector2(0.1f, 0.1f);
         }
         this.window.pivot = new Vector2(0.5f, 0.5f);
         this.window.TweenScale(Vector2.one, this.duration).SetEase(this.ease).OnComplete(() =>
         {
             this.window.pivot = new Vector2(0, 1);
             callback.Invoke();
         });
     }
     else
     {
         if (!this.keepOriginal)
         {
             this.window.scale = Vector2.one;
         }
         this.window.pivot = new Vector2(0.5f, 0.5f);
         this.window.TweenScale(new Vector2(0.1f, 0.1f), this.duration).SetEase(this.ease).OnComplete(() =>
         {
             this.window.pivot = new Vector2(0, 1);
             callback.Invoke();
         });
     }
 }
 public void Play(Window.AnimationCompleteHandler callback)
 {
     if (!this.reverse)
     {
         if (!this.keepOriginal)
         {
             this.window.alpha = 0f;
         }
         this.window.TweenFade(1f, this.duration).SetEase(this.ease).OnComplete(callback.Invoke);
     }
     else
     {
         if (!this.keepOriginal)
         {
             this.window.alpha = 1f;
         }
         this.window.TweenFade(0f, this.duration).SetEase(this.ease).OnComplete(callback.Invoke);
     }
 }