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