/// <inheritdoc /> public override void TraverseToNextNode() { TraversableGraph traversableGraph = (TraversableGraph)graph; for (int i = 0; i < Conditions.Count; i++) { ConditionalEventSet condition = Conditions[i]; if (condition.Evaluate()) { TraversableNode evaluatedCondition = GetConnectedNode($"{nameof(Conditions)} {i}"); if (evaluatedCondition != null) { evaluatedCondition.TriggerNode(); } else { traversableGraph.SignalEndReached(); } return; } } TraversableNode defaultNode = GetConnectedNode("Default"); if (defaultNode != null) { defaultNode.TriggerNode(); } else { traversableGraph.SignalEndReached(); } }
/// <inheritdoc /> public override void TraverseToNextNode() { TraversableGraph traversableGraph = (TraversableGraph)graph; TraversableNode exit = GetConnectedNode("Exit"); if (exit != null) { exit.TriggerNode(); } else { traversableGraph.SignalEndReached(); } }