Example #1
0
 void FirstStep()
 {
     if (firstPhase && !InMove && firstPhaseList.Count > 0)
     {
         //get chesses
         InPause = false;
         Transform currentSel = firstPhaseList[0] as Transform;
         if (!currentSel.GetComponent <CharacterProperty>().TurnFinished)
         {
             currentInMove = currentSel;
             ShowSelection(currentInMove, true);
             //doing commands
             UICommands firstCmd = decisions.GetFirstCommand(currentSel);
             print("1st: " + currentSel + ": " + firstCmd);
             InMove = ExcuteCommand(firstCmd, currentSel);
             if (firstCmd == UICommands.Defense)
             {
                 InPause = true;
             }
         }
         firstPhaseList.RemoveAt(0);
         if (firstPhaseList.Count == 0)
         {
             firstPhaseList.Clear();
             firstPhase      = false;
             secondPhaseList = InitSecondPhase();
         }
     }
     else if (firstPhaseList.Count == 0)
     {
         firstPhaseList.Clear();
         firstPhase = false;
     }
 }