/// <summary> /// Executes this node on the specified dialogue state. /// </summary> public override void PerformNode(DialoguePlayer state) { if (state.EvaluateCondition(Text)) { state.MoveToNode(BranchTrueNext); } else { state.MoveToNode(BranchFalseNext); } }
/// <summary> /// Executes this node on the specified dialogue state. /// </summary> public override void PerformNode(DialoguePlayer state) { state.EvaluateCondition(Text); }
/// <summary> /// Returns true if this choice is enabled. /// </summary> public bool IsEnabled(DialoguePlayer state) { return(!IsCondition || state.EvaluateCondition(Condition)); }
/// <summary> /// Returns true if this choice is enabled. /// </summary> public bool IsEnabled(DialoguePlayer state) { return(!IsCondition || state.EvaluateCondition(Condition).GetValueOrDefault(false)); }