コード例 #1
0
 private void GameWin()
 {
     closeUILoss = true;
     UIStatus.SetActive(false);
     UIEnd.SetActive(true);
     textWorL.text   = "WINNER";
     textResult.text = "YOUR POINT IS: " + point;
     StartCoroutine(Wait(7, 0));
     start = false;
 }
コード例 #2
0
 //Question mode selection
 public void ButtonQuestion()
 {
     start = true;
     UI.SetActive(true);
     UIStatus.SetActive(true);
     UIAdd.SetActive(true);
     UIChoose.SetActive(false);
     timeMore = Time.time;
     StartCoroutine(wait(2, 1f));
     noteText.text = "Your task is to answer questions to move to objects!";
 }
コード例 #3
0
 //Auto mode selection
 public void ButtonAuto()
 {
     StopAllCoroutines();
     UIChoose.SetActive(false);
     UI.SetActive(false);
     autoMove = true;
     start    = false;
     UIAdd.SetActive(true);
     UIConver.SetActive(false);
     UIStatus.SetActive(false);
     indexAuto = 0;
 }
コード例 #4
0
    //start
    private void Start()
    {
        audioSource = GetComponent <AudioSource>();
        if (keywords != null)
        {
            recognizer = new KeywordRecognizer(keywords, confidence);
            recognizer.OnPhraseRecognized += Recognizer_OnPhraseRecognized;
            recognizer.Start();
        }

        //UI start
        Randoms();
        pointText.text = " 0 ";
        UiEnd.SetActive(false);
        UIStatus.SetActive(false);
        UI.SetActive(false);
        UIChoose.SetActive(false);
        UIAdd.SetActive(false);
        UIConver.SetActive(false);
    }
コード例 #5
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 = "";
            }
        }
    }
コード例 #6
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 = "";
         }
     }
 }
コード例 #7
0
 public void Close()
 {
     UIStatus.SetActive(false);
 }
コード例 #8
0
 private void OnMouseDown()
 {
     UIStatus.SetActive(true);
 }