Beispiel #1
0
        public override void RemoveAllChildrenWithCleanup(bool cleanup)
        {
            // Invalidate atlas index. issue #569
            if (Children != null && Children.Count > 0)
            {
                CCObject pObject = null;

                for (int i = 0; i < Children.Count; i++)
                {
                    pObject = Children[i];
                    CCSprite pChild = pObject as CCSprite;

                    if (pChild != null)
                    {
                        removeSpriteFromAtlas(pChild);
                    }
                }
            }

            // http://www.cocos2d-x.org/boards/17/topics/10592
            base.RemoveAllChildrenWithCleanup(cleanup);

            m_pobDescendants.Clear();
            m_pobTextureAtlas.removeAllQuads();
        }