private void Start() { source = GetComponent <AudioSource>(); robot = GameObject.FindGameObjectWithTag("Robot").GetComponent <RobotScheduler>(); foreach (quizzQuestion qQ in listQuestions) { questions.Enqueue(qQ); } }
public void startEvent() { foreach (GameObject go in pillars) { go.SetActive(true); } robot = GameObject.FindGameObjectWithTag("Robot").GetComponent <RobotScheduler>(); source = GetComponent <AudioSource>(); StartCoroutine(setUpScene()); }
public IEnumerator unravel(HatScript chosenHat) { StartCoroutine(hats[0].moveTo(new Vector3(hats[0].transform.position.x, hats[0].transform.position.y + 50, hats[0].transform.position.z), 1f)); StartCoroutine(hats[1].moveTo(new Vector3(hats[1].transform.position.x, hats[1].transform.position.y + 50, hats[1].transform.position.z), 1f)); StartCoroutine(hats[2].moveTo(new Vector3(hats[2].transform.position.x, hats[2].transform.position.y + 50, hats[2].transform.position.z), 1f)); yield return(new WaitForSeconds(1f)); if (chosenHat != goodHat) { bottomPit.SetActive(false); RobotScheduler robot = GameObject.FindGameObjectWithTag("Robot").GetComponent <RobotScheduler>(); robot.stringContainersQueue.Enqueue(new RobotScheduler.stringContainer() { strings = new List <string>() { "Ohhh...too bad !" }, expressions = new List <RobotScheduler.stringContainer.faceExpression> { RobotScheduler.stringContainer.faceExpression.FRUSTR } }); robot.queueAc.Enqueue(RobotScheduler.EventAction.TALK); robot.playNextAction(); } else { RobotScheduler robot = GameObject.FindGameObjectWithTag("Robot").GetComponent <RobotScheduler>(); robot.stringContainersQueue.Enqueue(new RobotScheduler.stringContainer() { strings = new List <string>() { "Well done !" }, expressions = new List <RobotScheduler.stringContainer.faceExpression> { RobotScheduler.stringContainer.faceExpression.HAPPY } }); robot.queueAc.Enqueue(RobotScheduler.EventAction.TALK); robot.playNextAction(); RenderSettings.ambientIntensity = 1.2f; } }
private void Start() { robot = GameObject.FindGameObjectWithTag("Robot").GetComponent <RobotScheduler>(); }