예제 #1
0
        public void Clear()
        {
            pool.ReturnChildren(SpriteData);
            pool.ReturnChildren(PointData);
            pool.ReturnChildren(BoxData);

            var varE = ObjectVars.GetEnumerator();

            while (varE.MoveNext())
            {
                pool.ReturnChildren(varE.Current.Value);
                pool.ReturnObject(varE.Current.Value);
            }
            ObjectVars.Clear();

            var tagE = ObjectTags.GetEnumerator();

            while (tagE.MoveNext())
            {
                var list = tagE.Current.Value;
                list.Clear();
                pool.ReturnObject(list);
            }
            ObjectTags.Clear();

            Sounds.Clear();
            AnimationVars.Clear();
            AnimationTags.Clear();
            Events.Clear();
        }
예제 #2
0
        public void Clear()
        {
            var varE = ObjectVars.GetEnumerator();

            while (varE.MoveNext())
            {
                SpriterObjectPool.ReturnStructDict(varE.Current.Value);
            }
            ObjectVars.Clear();

            var tagE = ObjectTags.GetEnumerator();

            while (tagE.MoveNext())
            {
                var list = tagE.Current.Value;
                list.Clear();
                SpriterObjectPool.ReturnObject(list);
            }
            ObjectTags.Clear();

            Sounds.Clear();
            AnimationVars.Clear();
            AnimationTags.Clear();
            Events.Clear();
        }