void Start() { clue.Set("Use the Arrow Keys to Move Your Character and press the Spacebar to Interact with Objects and find Clues. Hint: Go to the Piano for you're first clue. Once You Find All Nine Clues Interact with the White Spot Here."); clueBlock.Execute(); string jsonFile = textFile.text; randFilm = UnityEngine.Random.Range(0, 2); text = endText.GetComponent <Text>(); text.color = new Color(text.color.r, text.color.g, text.color.b, 0f); end.Equals(4); numOfClues = 0; switch (randFilm) { case 0: randFil = 0; break; case 1: randFil = 9; break; case 2: randFil = 9; break; } Debug.Log(randFilm); clueReread = JsonHelper.FromJson <ClueObject>(jsonFile); }
private void Update() { var curCounter = gazeCounter; RaycastHit hit; if (Physics.Raycast(eye.position, eye.forward, out hit)) { if (hit.collider == doorCol) { gazeCounter += Time.deltaTime; } else { gazeCounter = 0; } } else { gazeCounter = 0; } if (gazeCounter >= gazeTime && curCounter <= gazeTime) { runBlockWhenGazed.Execute(); fungusBoolHasGazed.Set(true); } }