Пример #1
0
    static void PlayersTurn()
    {
        TutorialUIMaster.SetContinue(false);

        if ((int)phase > 0)  //If we are past the introduction when this method is called
        {
            if ((int)phase > 4)
            {
                SceneManager.LoadScene("TitleScreen");
            }
            else
            {
                if (phase == T_Phases.Deploy)
                {
                    d_markers.SetActive(true);
                }
                else
                {
                    turn_button.interactable = true;
                }


                acceptInput = true;
                instance.StartCoroutine(TutorialUIMaster.MoveTextbox());
            }

            CheckForImage();
        }
        else
        {
            NextPhase();  //If we just finished the introduction (phase == 0), go to the next phase (Deploy).
        }
    }
Пример #2
0
 static void ForwardText()
 {
     if (whichText + 1 < phaselength)
     {
         TutorialUIMaster.ChangeText((int)phase, ++whichText);
         if (whichText + 1 == phaselength)
         {
             TutorialUIMaster.SetContinue(true);
         }
         CheckForImage();
     }
 }
Пример #3
0
    void Update()
    {
        Debug.Log(PlayerMaster.PriorTurn);

        if (acceptInput)
        {
            switch (phase)
            {
            case T_Phases.Deploy:
                DeployMaster.SetTutorialTiles();
                if (d_markers.transform.childCount == 0)
                {
                    turn_button.interactable = true;
                }
                if (PlayerMaster.CurrentTurn == 1)
                {
                    acceptInput = false;
                    ai_turn     = true;
                    instance.StartCoroutine(TutorialAI.Deploy());
                }
                break;

            case T_Phases.Move:
                MoveMaster.DecideMove();
                if (PlayerMaster.CurrentTurn == 1)
                {
                    acceptInput = false;
                    ai_turn     = true;
                    instance.StartCoroutine(TutorialAI.Move());
                }
                break;

            case T_Phases.Cannon:
                CannonMaster.HandleCannons();
                if (PlayerMaster.CurrentTurn == 1)
                {
                    acceptInput = false;
                    ai_turn     = true;
                    instance.StartCoroutine(TutorialAI.IDontHaveCannons());
                }
                break;

            case T_Phases.Fight:
                MoveMaster.DecideMove();
                if (PlayerMaster.CurrentTurn == 1)
                {
                    acceptInput = false;
                    ai_turn     = true;
                    instance.StartCoroutine(TutorialAI.Move());
                }
                break;

            default:
                Debug.Log("Default");
                break;
            }
        }

        if (ai_turn)
        {
            if (PlayerMaster.CurrentTurn == 0)
            {
                ai_turn = false;
                TutorialUIMaster.c_bool = false;
                TutorialUIMaster.SetContinue(false);
                NextPhase();
                instance.StartCoroutine(TutorialUIMaster.MoveTextbox());
            }
        }
    }