Dispose() public method

public Dispose ( ) : void
return void
Ejemplo n.º 1
0
        override public void Dispose()
        {
            int cnt = _transitions.Count;

            for (int i = 0; i < cnt; ++i)
            {
                Transition trans = _transitions[i];
                trans.Dispose();
            }

            cnt = _controllers.Count;
            for (int i = 0; i < cnt; ++i)
            {
                Controller c = _controllers[i];
                c.Dispose();
            }

            if (scrollPane != null)
            {
                scrollPane.Dispose();
            }

            base.Dispose();             //Dispose native tree first, avoid DisplayObject.RemoveFromParent call

            cnt = _children.Count;
            for (int i = cnt - 1; i >= 0; --i)
            {
                GObject obj = _children[i];
                obj.InternalSetParent(null);                 //Avoid GObject.RemoveParent call
                obj.Dispose();
            }
        }
 static int Dispose(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         FairyGUI.Transition obj = (FairyGUI.Transition)ToLua.CheckObject(L, 1, typeof(FairyGUI.Transition));
         obj.Dispose();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 3
0
        public void Dispose()
        {
            if (!_playing)
            {
                return;
            }

            _playing    = false;
            _onComplete = null;

            int cnt = _items.Count;

            for (int i = 0; i < cnt; i++)
            {
                TransitionItem item = _items[i];
                if (item.target == null || item.completed)
                {
                    continue;
                }

                if (item.tweener != null)
                {
                    item.tweener.Kill();
                    item.tweener = null;
                }

                if (item.type == TransitionActionType.Transition)
                {
                    Transition trans = ((GComponent)item.target).GetTransition(item.value.s);
                    if (trans != null)
                    {
                        trans.Dispose();
                    }
                }
                else if (item.type == TransitionActionType.Shake)
                {
                    if (item.onShake != null)
                    {
                        Timers.inst.Remove(item.onShake);
                    }
                }
            }
        }
Ejemplo n.º 4
0
        override public void Dispose()
        {
            int transCnt = _transitions.Count;

            for (int i = 0; i < transCnt; ++i)
            {
                Transition trans = _transitions[i];
                trans.Dispose();
            }

            base.Dispose();             //Dispose native tree first, avoid DisplayObject.RemoveFromParent call

            int numChildren = _children.Count;

            for (int i = numChildren - 1; i >= 0; --i)
            {
                GObject obj = _children[i];
                obj.parent = null;                 //Avoid GObject.RemoveParent call
                obj.Dispose();
            }
        }