public override NodeStatus Process() { NodeStatus status = CurrentSubNode.Execute(); switch (status) { case NodeStatus.Complete: { if (Next()) { return(NodeStatus.Processing); } else { return(NodeStatus.Complete); } } case NodeStatus.Processing: case NodeStatus.Wait: { return(NodeStatus.Processing); } case NodeStatus.Break: { return(NodeStatus.Break); } default: { return(NodeStatus.Complete); } } }
public override NodeStatus Process() { if (m_loopCount >= LoopTimes) { return(NodeStatus.Complete); } NodeStatus status = CurrentSubNode.Execute(); switch (status) { case NodeStatus.Complete: case NodeStatus.Break: { if (Next()) { return(NodeStatus.Processing); } else { m_loopCount++; ResetLoop(); return(NodeStatus.Processing); } } case NodeStatus.Processing: case NodeStatus.Wait: { return(NodeStatus.Processing); } default: { return(NodeStatus.Complete); } } }