示例#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");
     }
 }
示例#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");
     }
 }
示例#3
0
 public void AddChild(BTCondition child)
 {
     m_lstCondition.Add(child);
 }
示例#4
0
 public BTNotCondition(string name, BTCondition child) : base(name)
 {
     m_cChild = child;
 }
示例#5
0
 public override void Clear()
 {
     m_cChild = null;
     base.Clear();
 }