Exemplo n.º 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]);
        }
Exemplo n.º 2
0
        public BehaviorTreeRes getAndLoadBT(BTID id)
        {
            LoadParam param = Ctx.m_instance.m_poolSys.newObject <LoadParam>();

            LocalFileSys.modifyLoadParam(m_btAttrSys.m_id2ItemDic[id].m_path, param);
            param.m_loadNeedCoroutine = false;
            BehaviorTreeRes ret = getAndLoad <BehaviorTreeRes>(param);

            Ctx.m_instance.m_poolSys.deleteObj(param);

            return(ret);
        }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
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);
        }