Пример #1
0
    public void ReleaseWorld()
    {
        if (m_rootNodeGroup != null)
        {
            m_rootNodeGroup.BhvOnLeave();
            m_rootNodeGroup = null;
        }

        if (m_worldLevel != null)
        {
            m_worldLevel.ClearFirstLevel();
            m_worldLevel = null;
        }
    }
Пример #2
0
        private void DetachActor(LevelBase level, IGraphNodeGroup nodeGroup)
        {
            Debug.Assert(level != null);

            level.DetachChild(nodeGroup);                                                      // 레벨에서 삭제하고

            nodeGroup.BhvOnLeave();                                                            //자식들을 종료시키고

            List <GraphMonoPoolNode> lstPoolNodes = nodeGroup.GetChilds <GraphMonoPoolNode>(); // 풀노드만 빼온후

            nodeGroup.DetachAllChildren();                                                     //자식들을 제거함

            for (int i = 0; i < lstPoolNodes.Count; i++)
            {
                GraphMonoPoolNode poolNode = lstPoolNodes[i];
                poolNode.Unlock();
                Global.FactoryMgr.FastDestory(poolNode); //다시 풀링으로..
            }

            lstPoolNodes.Clear();
        }