Esempio n. 1
0
 void Awake()
 {
     pos = transform.position;
     allCastBars.Add(this);
     if (gameObject.name == "PlayerCastBar")
     {
         _mainBar = this;
     }
 }
Esempio n. 2
0
 // Exits solo mode for this cast bar (must be the last cast bar pushed)
 public static void exitSolo(CastBar soloBar)
 {
     if (soloBar != soloStack.Pop())
     {
         Debug.LogError("StateManager: Solo Stack Mismatch");
     }
     // If stack is empty, hide all except for player
     if (soloStack.Count == 0)
     {
         foreach (CastBar bar in allCastBars)
         {
             bar.hidden = !(bar.focus = (bar == _mainBar));
         }
     }
     // Otherwise, solo the next in the stack
     else
     {
         soloStack.Peek().solo();
     }
 }
Esempio n. 3
0
 // Enters solo mode for this cast bar
 public static void enterSolo(CastBar soloBar)
 {
     soloBar.solo();
     soloStack.Push(soloBar);
 }