Esempio n. 1
0
 public virtual void CloseWindow()
 {
     if (!UI || !UI.gameObject)
     {
         return;
     }
     if (!IsUIOpen)
     {
         return;
     }
     if (IsPausing)
     {
         return;
     }
     if (!animated)
     {
         UI.window.alpha = 0;
     }
     else
     {
         ZetanUtility.FadeTo(0, animationSpeed, this);
     }
     UI.window.blocksRaycasts = false;
     WindowsManager.Instance.Remove(this);
     IsUIOpen = false;
 }
Esempio n. 2
0
 public virtual void OpenWindow()
 {
     if (!UI || !UI.gameObject)
     {
         return;
     }
     if (IsUIOpen)
     {
         return;
     }
     if (IsPausing)
     {
         return;
     }
     if (!animated)
     {
         UI.window.alpha = 1;
     }
     else
     {
         ZetanUtility.FadeTo(1, animationSpeed, this);
     }
     UI.window.blocksRaycasts = true;
     WindowsManager.Instance.Push(this);
     IsUIOpen = true;
 }