Esempio n. 1
0
        public void Cancel(bool destroyTarget = true)
        {
            StopAllAnimation();

            if (Parent != null)
            {
                if (ToWindow != null && destroyTarget)
                {
                    Parent.DestroyWindow(ToWindow.gameObject);
                    ToWindow = null;
                }

                if (InstantiateCoroutine != null)
                {
                    Parent.StopInstantiateCoroutine(InstantiateCoroutine);
                    InstantiateCoroutine = null;
                }
            }

            if (SwitchAction != null)
            {
                SwitchAction.Cancel();
            }
        }