Exemplo n.º 1
0
 private void WinOrLoss()
 {
     if (!closeUILoss)
     {
         GameLoss();
     }
     else
     {
         UIQuestion.SetActive(false);
         if (word == "Restart")
         {
             Restart();
             word = "";
         }
     }
 }
Exemplo n.º 2
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 = "";
            }
        }
    }
Exemplo n.º 3
0
 private void GameLoss()
 {
     if (Time.time == 80 + Mathf.Round(timeStart))
     {
         if (!closeUILoss)
         {
             UIQuestion.SetActive(false);
             UIStatus.SetActive(false);
             UIEnd.SetActive(true);
             textWorL.text   = "LOSER";
             textResult.text = "YOUR POINT IS: " + point;
             StartCoroutine(Wait(6, 0));
             start = false;
         }
     }
     else if (Time.time >= 80 + Mathf.Round(timeStart))
     {
         if (word == "Restart")
         {
             Restart();
             word = "";
         }
     }
 }
Exemplo n.º 4
0
    private void Handle()
    {
        if (start)
        {
            for (int i = 0; i < 16; i++)
            {
                if (i < 8)
                {
                    if (word == keywordsY[index])
                    {
                        RandomQuestion();

                        if (!closeUILoss)
                        {
                            StartCoroutine(MoveCam());
                            StartCoroutine(Wait(13, 0));
                            StartCoroutine(Wait(5, 0.5f));
                            StartCoroutine(Wait(3, 3));
                            UIQuestion.SetActive(false);
                            StartCoroutine(SetActiveUIQuestion(2, UIQuestion, true));
                        }

                        point += 10;
                        word   = "";
                    }
                }
                if (word == keywordsN[i])
                {
                    StartCoroutine(Wait(14, 0));
                    StartCoroutine(Wait(4, 0.5f));
                    point -= 7;
                    word   = "";
                }
            }
        }
    }