// Update is called once per frame void Update() { if (!isInteracting) { return; } if (Input.GetKeyDown(KeyCode.Z)) { // drop input if (chatbox.IsBusy()) { return; } if ((next = NextDialogue()) != null) { chatbox.ShowText(next); } else { isInteracting = false; dialogueIndex = 0; player.EndInteraction(); chatbox.Hide(); DoAction(); } } }
// Update is called once per frame void Update() { if (!isInteracting) { return; } // drop input if (chatbox.IsBusy()) { return; } if (Input.GetKeyDown(KeyCode.Z)) { isInteracting = false; player.EndInteraction(); chatbox.Hide(); Destroy(gameObject); } }