Exemplo n.º 1
0
    public static void GoBack(Type specificSubphaseToFinish = null)
    {
        DecisionSubPhase decisionSubphase = CurrentSubPhase.PreviousSubPhase as DecisionSubPhase;

        if (decisionSubphase != null)
        {
            decisionSubphase.DecisionWasPreparedAndShown = false;
        }

        Type subphaseToFinish = specificSubphaseToFinish ?? CurrentSubPhase.GetType();

        FinishSubPhase(subphaseToFinish);
        CurrentSubPhase.Resume();
    }
Exemplo n.º 2
0
 public static void FinishSubPhase(System.Type subPhaseType)
 {
     if (CurrentSubPhase.GetType() == subPhaseType)
     {
         if (DebugManager.DebugPhases)
         {
             Debug.Log("Phase " + subPhaseType + "is finished directly");
         }
         Next();
     }
     else
     {
         Debug.Log("OOPS! YOU WANT TO FINISH " + subPhaseType + " SUBPHASE, BUT NOW IS " + CurrentSubPhase.GetType() + " SUBPHASE!");
     }
 }
Exemplo n.º 3
0
    private static void CheckScheduledFinishes()
    {
        if (subPhasesToFinish.Count != 0)
        {
            List <System.Type> tempList = new List <System.Type>();
            foreach (var subPhaseType in subPhasesToFinish)
            {
                tempList.Add(subPhaseType);
            }

            foreach (var subPhaseType in tempList)
            {
                if (CurrentSubPhase.GetType() == subPhaseType)
                {
                    subPhasesToFinish.Remove(subPhaseType);
                    Next();
                }
            }
        }
    }
Exemplo n.º 4
0
    public static void FinishSubPhase(System.Type subPhaseType)
    {
        if (CurrentSubPhase.GetType() == subPhaseType)
        {
            if (DebugManager.DebugPhases)
            {
                Debug.Log("Phase " + subPhaseType + "is finished directly");
            }
            Next();
        }
        else
        {
            Debug.Log("OOPS! YOU WANT TO FINISH " + subPhaseType + " SUBPHASE, BUT NOW IS " + CurrentSubPhase.GetType() + " SUBPHASE!");

            /*if (!subPhasesToFinish.Contains(subPhaseType))
             * {
             *  Debug.Log("Phase " + subPhaseType + " is planned to finish");
             *  subPhasesToFinish.Add(subPhaseType);
             * }*/
        }
    }