//Check is people or robot public void PeOrRo() { if (word == "Super Handsome" && !closeHand) { UIHand.SetActive(false); UIChoose.SetActive(true); //UIStatus.SetActive(true); //timeMore = Time.time; //StartCoroutine(wait(2, 1f)); //start = true; StartCoroutine(wait(8, 1f)); closeHand = true; word = ""; } if ((word == "Handsome" || word == "Yes") && !closeHand) { exit++; if (exit == 2) { CloseGame(); } audioSource.PlayOneShot(audioClips[7], 1f); word = ""; } }
//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!"; }
//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; }
//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); }