public void FinishedNode(BehaviorNode node) { if (Nodes.Contains(node)) { if (RemainingNodes.Contains(node)) { RemainingNodes.Remove(node); if (RemainingNodes.Count==0) { BehaviorPlan.Instance.TerminateBehavior(this); } }else{ BehaviorPlan.Instance.DebugIf("error","Re-terminating behavior node '"+node.ToString() +"' on behavior '"+ Behavior.Id+"'"); } }else{ BehaviorPlan.Instance.DebugIf("error","Disconnected behavior node '"+node.ToString() +"' terminating on behavior '"+ Behavior.Id+"'"); } }
public void AddNode(BehaviorNode node) { nodes.Add(node); node.ParentBehavior = this; }