Esempio n. 1
0
 // Exit solo mode for this actor (should be at top of stack)
 public void ExitSolo(ATBActor soloActor)
 {
     //Debug.Log("exit:" + soloActor.gameObject.name);
     if (soloActor != soloStack.Pop())
     {
         Debug.LogError("StateManager: Solo Stack Mismatch");
     }
     // If stack is now empty, unpause all actors
     if (soloStack.Count == 0)
     {
         //CastBar.MainBar.focus = true;
         foreach (ATBActor actor in Battlefield.instance.Actors)
         {
             actor.isCast = false;
         }
         if (BattleManager.instance != null)
         {
             BattleManager.instance.PH.Pause = false; // Unpause Battle events.
         }
         Battlefield.instance.PH.Pause = false;       // Pause battle field
     }
     // Otherwise, give solo to next in stack
     else
     {
         soloActor.Pause = true;
         soloStack.Peek().Pause = false;
     }
 }
Esempio n. 2
0
        // Enter solo mode for this actor
        public void EnterSolo(ATBActor soloActor)
        {
            //Debug.Log("enter:" + soloActor.gameObject.name);

            if (soloStack.Count == 0)
            {
                if (BattleManager.instance != null)
                {
                    BattleManager.instance.PH.Pause = true; // Pause Battle events.
                }
                Battlefield.instance.PH.Pause = true;       // Pause battle field
            }
            else
            {
                soloStack.Peek().Pause = true;
            }
            soloActor.Pause = false;
            soloStack.Push(soloActor);
        }