Exemplo n.º 1
0
        public void DetachAllChildren()
        {
            for (int idx = 0; idx < this.children.Count; ++idx)
            {
                if (children[idx] is IGraphNodeGroup)
                {
                    IGraphNodeGroup nodeGroup = children[idx] as IGraphNodeGroup;
                    nodeGroup.DetachAllChildren();
                }

                DetachChild(this.children[idx]);
            }
        }
Exemplo n.º 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();
        }