Example #1
0
 public override void SetParent(BSNode node)
 {
     if (!m_parents.Contains(node))
     {
         m_parents.Add(node);
     }
 }
Example #2
0
        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();
        }
Example #3
0
 public override void RemoveParent(BSNode node)
 {
     m_parents.Remove(node);
 }
Example #4
0
 public new void AddChild(BSNode node)
 {
 }
Example #5
0
 public void RemoveChild(BSNode node)
 {
     m_transitions.Remove(node);
     node.RemoveParent(this);
 }
Example #6
0
 public virtual void RemoveParent(BSNode node)
 {
     m_parentNode = null;
 }
Example #7
0
 public void AddChild(BSNode node, BSEvaluator predecate)
 {
     m_transitions[node] = predecate;
     node.SetParent(this);
 }
Example #8
0
 public virtual void SetParent(BSNode node)
 {
     m_parentNode = node;
 }
Example #9
0
 public virtual void RemoveChild(BSNode node)
 {
     m_connectNode.RemoveParent(this);
     m_connectNode = null;
 }
Example #10
0
 public virtual void AddChild(BSNode node)
 {
     m_connectNode = node;
     node.SetParent(this);
 }
Example #11
0
 public override void AddChild(BSNode node)
 {
     m_children.Add(node);
     node.SetParent(this);
 }
Example #12
0
 public override void RemoveChild(BSNode node)
 {
     m_children.Remove(node);
     node.RemoveParent(this);
 }