IEnumerator HelloLoop() { yield return(new WaitForSeconds(helloDelays[helloIdx])); voicebox.onDialogueEnd.AddListener(TryHello); voicebox.ActivateDialogue(hellos[helloIdx]); helloIdx += 1; }
public void DoAction() { switch (interactState) { case InteractState.Normal: Debug.Log("Hi you interacted with the fountain"); menuUp = true; PlayerStats.Instance.MouseLook.enabled = false; PlayerStats.Instance.InMenu = true; Cursor.lockState = CursorLockMode.None; // fountainMenuObject.SetActive(true); fountainDialogueObject.SetActive(true); dialogueScript.onDialogueEnd.AddListener(DialogueEndCheck); dialogueScript.ActivateDialogue(fountainDialogue); break; case InteractState.Intro: GameScript.Instance.FountainIntro(); break; default: break; } }