Exemplo n.º 1
0
 private void AnimationComplete()
 {
     this.AnimationStop();
     if (Service.ViewTimeEngine != null)
     {
         Service.ViewTimeEngine.UnregisterFrameTimeObserver(this);
     }
     else if (Service.Logger != null)
     {
         Service.Logger.Error("ScreenTransition.AnimationComplete: ViewTimeEngine is not set in Service");
     }
     if (this.disabledColliders)
     {
         if (Service.CameraManager != null)
         {
             if (!Service.CameraManager.WipeCamera.IsRendering())
             {
                 Service.CameraManager.UXCamera.ReceiveEvents = true;
             }
         }
         else if (Service.Logger != null)
         {
             Service.Logger.Error("ScreenTransition.AnimationComplete: CameraManager is not set in Service");
         }
         this.disabledColliders = false;
     }
     if (this.onComplete != null)
     {
         OnScreenTransitionComplete onScreenTransitionComplete = this.onComplete;
         this.onComplete = null;
         onScreenTransitionComplete();
     }
 }
Exemplo n.º 2
0
 public void PlayTransition(string transitionName, OnScreenTransitionComplete onTransitionComplete, bool delay)
 {
     this.AnimationComplete();
     this.onComplete = onTransitionComplete;
     Service.Get <ViewTimeEngine>().RegisterFrameTimeObserver(this);
     this.animationToPlay = transitionName;
     if (delay)
     {
         this.waitFrames = 2;
         return;
     }
     this.waitFrames = 0;
     this.AnimationPlay();
 }