Exemplo n.º 1
0
 public override void AddChild(BTNode child)
 {
     if (m_cChild != null)
     {
         CLog.LogError("BTDecorator has exist child node! add has override it");
     }
     if (child is BTCondition)
     {
         m_cChild = (BTCondition)child;
     }
     else
     {
         CLog.LogError("BTNotCondition AddChild is not BTCondition");
     }
 }
Exemplo n.º 2
0
 public override void AddChild(BTNode child)
 {
     if (m_cChild != null)
     {
         Debug.LogError("BTDecorator has exist child node! add has override it");
         if (m_lstChild != null && m_lstChild.Contains(m_cChild))
         {
             m_lstChild.Remove(m_cChild);
         }
     }
     if (child is BTCondition)
     {
         base.AddChild(child);
         m_cChild = (BTCondition)child;
     }
     else
     {
         Debug.LogError("BTNotCondition AddChild is not BTCondition");
     }
 }
Exemplo n.º 3
0
 public void AddChild(BTCondition child)
 {
     m_lstCondition.Add(child);
 }
Exemplo n.º 4
0
 public BTNotCondition(string name, BTCondition child) : base(name)
 {
     m_cChild = child;
 }
Exemplo n.º 5
0
 public override void Clear()
 {
     m_cChild = null;
     base.Clear();
 }