public override void Clear() { Root = null; StatesSource = null; UpdateStates(); base.Clear(); }
public override void RemoveNode(Node node) { if (node == Root) { Root = nodes.FirstOrDefault() as BTBlock; } if (node == StatesSource) { StatesSource = null; UpdateStates(); } base.RemoveNode(node); }
public override Node AddNode(Type type) { Node node = base.AddNode(type); if (Root == null) { Root = node as BTBlock; } if (type == typeof(StatesParamSource)) { if (StatesSource != null) { RemoveNode(node); throw new NotImplementedException("States concatenation unsupported"); } StatesSource = node as StatesParamSource; UpdateStates(); } UpdateStates(node); return(node); }