Exemple #1
0
 private void Restart()
 {
     timeStart = 0;
     StartCoroutine(Wait(9, 0));
     index = 8;
     StartCoroutine(MoveCam());
     StartCoroutine(Wait(0, 3));
     StartCoroutine(Wait(1, 15));
     UIEnd.SetActive(false);
     UIDoor.SetActive(true);
     point       = 0;
     time        = 80;
     closeUILoss = false;
     for (int j = 0; j < 8; j++)
     {
         if (checkQuestion[j] == 1)
         {
             checkQuestion[j] = 0;
         }
     }
     GoOrNot();
 }
Exemple #2
0
    private void Menu()
    {
        if (!isPlaying)
        {
            if (word == "Start")
            {
                if (!checkInfo)
                {
                    isPlaying = true;
                    Debug.Log("Start");
                    UIStart.SetActive(false);
                    UIDoor.SetActive(true);
                    StartCoroutine(Wait(0, 0));
                    StartCoroutine(Wait(1, 12));
                    word = "";
                }
            }
            if (word == "Information")
            {
                checkInfo = true;
                UIStart.SetActive(false);
                UIInformation.SetActive(true);
            }
            if (word == "Main menu")
            {
                checkInfo = false;
                UIInformation.SetActive(false);
                UIStart.SetActive(true);
            }
        }

        if (word == "Quit")
        {
            Debug.Log("Quit");
            StartCoroutine(Wait(8, 0));
            StartCoroutine(Quit());
            word = "";
        }
    }
Exemple #3
0
    //Check Robot or Not
    private void GoOrNot()
    {
        if (word == "Absolutely")
        {
            if (!start)
            {
                StartCoroutine(Wait(2, 0));
                UIDoor.SetActive(false);
                UIQuestion.SetActive(true);
                UIStatus.SetActive(true);
                RandomQuestion();
                StartCoroutine(MoveCam());
                StartCoroutine(Wait(3, 4));
                timeStart = Time.time;
                start     = true;
            }
            word = "";
        }

        if (word == "Yes" || word == "Definitely")
        {
            if (!start)
            {
                count++;
                if (count < 3)
                {
                    StartCoroutine(Wait(12, 0));
                }
                else if (count == 3)
                {
                    Debug.Log("You are a Robot");
                    StartCoroutine(Wait(10, 0));
                    StartCoroutine(Quit());
                }
                word = "";
            }
        }
    }