using Serein.DynamicFlow; using System.Diagnostics; namespace Serein.DynamicFlow.NodeModel { /// /// 组合动作节点(用于动作区域) /// public class CompositeActionNode : NodeBase { public List ActionNodes; /// /// 组合动作节点(用于动作区域) /// public CompositeActionNode(List actionNodes) { ActionNodes = actionNodes; } public void AddNode(SingleActionNode node) { ActionNodes.Add(node); MethodDetails ??= node.MethodDetails; } //public override void Execute(DynamicContext context) //{ // //Dictionary dict = new Dictionary(); // for (int i = 0; i < ActionNodes.Count; i++) // { // SingleActionNode? action = ActionNodes[i]; // try // { // action.Execute(context); // } // catch (Exception ex) // { // Debug.Write(ex.Message); // return; // } // } // CurrentState = true; // return; // /*foreach (var nextNode in TrueBranchNextNodes) // { // nextNode.ExecuteStack(context); // }*/ //} } }