using System.Collections.Generic; namespace Model { public abstract class Node { private readonly NodeConfig config; protected readonly List children = new List(); protected Node(NodeConfig config) { this.config = config; } /// /// 策划配置的id /// public int Id { get { return this.config.Id; } } /// /// 节点的类型例如: NodeType.Not /// public NodeType Type { get { return this.config.Type; } } public List Args { get { return this.config.Args; } } public void AddChild(Node child) { this.children.Add(child); } public virtual bool Run(Env env) { return true; } } }