protected Node SpeakUI(GameObject agent1, string text) { return(new SequenceParallel( Speak(agent1), new LeafInvoke(() => { if (DialogueUI.Available()) { if (DialogueUI.Finished(text)) { return RunStatus.Success; } else { DialogueUI.SetText(text); return RunStatus.Running; } } else { return RunStatus.Running; } }), new LeafWait(1000) )); }