public virtual void Load(Graph graph, SerNode sn) { this.graph = graph; this.blackboard = graph.Blackboard; this.ID = sn.ID; this.X = sn.X; this.Y = sn.Y; this.ExtraInfo = sn.ExtraInfo; this.RegisterPort(); }
public void Init(Graph graph) { Blackboard = new SerBlackboard(); Blackboard.Init(graph.Blackboard); foreach (var node in graph.Nodes.Values) { SerNode sn = new SerNode(); sn.Init(node); Nodes.Add(sn); } foreach (var connect in graph.Connections) { SerConnect sc = new SerConnect(); sc.Init(connect); Connections.Add(sc); } }