/// <summary> /// If the current node is a <see cref="ShowMessageNode"/>, advances to the next node. /// </summary> /// <param name="choice">The choice made. Ignored if there are no choices.</param> public void AdvanceMessage(int choice) { ShowMessageNode showMessageNode = CurrentNode as ShowMessageNode; if (showMessageNode != null) { showMessageNode.PerformChoice(this, choice); } else { throw new InvalidOperationException("Current node is not a ShowMessageNode."); } }
/// <summary> /// Shows a text node. /// </summary> internal void ShowMessage(ShowMessageNode node) { if (OverrideOnShowMessage != null) { OverrideOnShowMessage(this, node); } else if (GlobalOnShowMessage != null) { GlobalOnShowMessage(this, node); } else { Debug.LogWarning("DialoguePlayer: no OnShowMessage delegate is bound."); } }