public void Destroy() { Stop(); m_Tree = null; m_Runner = null; m_Agent = null; }
public BTAgent(string btPath, string libraryName, string treeName) { m_BtPath = btPath; m_LibraryName = libraryName; m_TreeName = treeName; m_Pause = false; m_Runner = null; m_Agent = null; m_Actions = new List <BTAction>(); m_Tree = Reflecter.Instance.Instantiate(libraryName, treeName); }
public void SetAgent(IAgent agent) { if (m_Agent == null || m_Agent.Equals(null) || !m_Agent.Equals(agent)) { m_Agent = agent; for (int i = 0; i < m_Actions.Count; i++) { m_Actions[i].SetAgent(m_Agent); } if (m_Runner == null) { m_Runner = new BTCoroutine(BTLauncher.Instance, Runner()); } } }