예제 #1
0
        public BehaviorTree getBT(BTID id)
        {
            if (!m_id2BTDic.ContainsKey(id))
            {
                BehaviorTreeRes res = getAndSyncLoadBT(id);
                this.unload(res.GetPath(), null);
            }

            return(m_id2BTDic[id]);
        }
예제 #2
0
        override public void dispose()
        {
            if (m_btRes != null)
            {
                Ctx.m_instance.m_aiSystem.behaviorTreeMgr.unload(m_btRes.GetPath(), null);
                m_btRes = null;
            }

            if (m_bt != null)
            {
                m_bt = null;
            }

            Ctx.m_instance.m_aiSystem.aiControllerMgr.removeController(this);
        }