public override void SetParent(BSNode node) { if (!m_parents.Contains(node)) { m_parents.Add(node); } }
public override void Traverse() { float bestValue = -1f; BSNode bestNode = null; foreach (KeyValuePair <BSNode, BSEvaluator> transition in m_transitions) { float transValue = transition.Value(); if (transValue > bestValue) { bestValue = transValue; bestNode = transition.Key; } } bestNode.Traverse(); }
public override void RemoveParent(BSNode node) { m_parents.Remove(node); }
public new void AddChild(BSNode node) { }
public void RemoveChild(BSNode node) { m_transitions.Remove(node); node.RemoveParent(this); }
public virtual void RemoveParent(BSNode node) { m_parentNode = null; }
public void AddChild(BSNode node, BSEvaluator predecate) { m_transitions[node] = predecate; node.SetParent(this); }
public virtual void SetParent(BSNode node) { m_parentNode = node; }
public virtual void RemoveChild(BSNode node) { m_connectNode.RemoveParent(this); m_connectNode = null; }
public virtual void AddChild(BSNode node) { m_connectNode = node; node.SetParent(this); }
public override void AddChild(BSNode node) { m_children.Add(node); node.SetParent(this); }
public override void RemoveChild(BSNode node) { m_children.Remove(node); node.RemoveParent(this); }