예제 #1
0
        /// <summary>
        /// Clean the specified except.
        /// </summary>
        /// <param name="except">Except.</param>
        public static void Clean(WindowBase except = null, bool forceAll = false)
        {
            WindowSystem.instance.currentWindows.RemoveAll((window) => {
                var result = WindowSystem.instance.DestroyWindowCheckOnClean_INTERNAL(window, null, except, forceAll);
                if (result == true)
                {
                    if (window != null)
                    {
                        WindowBase.DestroyImmediate(window.gameObject);
                    }
                }

                return(result);
            });

            WindowSystem.ResetDepth();

            if (except != null)
            {
                except.SetDepth(WindowSystem.instance.GetNextDepth(except.preferences, except.workCamera.depth), WindowSystem.instance.GetNextZDepth(except.preferences));
                except.OnCameraReset();
            }

            WindowSystem.RefreshHistory();
        }
예제 #2
0
        /// <summary>
        /// Clean the specified except.
        /// </summary>
        /// <param name="except">Except.</param>
        public static void Clean(List <WindowBase> except, bool forceAll = false)
        {
            WindowSystem.instance.currentWindows.RemoveAll((window) => {
                var result = WindowSystem.instance.DestroyWindowCheckOnClean_INTERNAL(window, except, null, forceAll);
                if (result == true)
                {
                    if (window != null)
                    {
                        WindowBase.DestroyImmediate(window.gameObject);
                    }
                }

                return(result);
            });

            WindowSystem.ResetDepth();

            if (except != null)
            {
                for (int i = 0; i < except.Count; ++i)
                {
                    var instance = except[i];
                    if (instance == null)
                    {
                        continue;
                    }
                    instance.SetDepth(WindowSystem.instance.GetNextDepth(instance.preferences, instance.workCamera.depth), WindowSystem.instance.GetNextZDepth(instance.preferences));
                    instance.OnCameraReset();
                }
            }

            WindowSystem.RefreshHistory();
        }
예제 #3
0
        public static void Clean(WindowBase except = null)
        {
            WindowSystem.instance.currentWindows.RemoveAll((window) => {
                if (window != null)
                {
                    if (except == null || window != except)
                    {
                        WindowBase.DestroyImmediate(window.gameObject);
                        return(true);
                    }

                    return(false);
                }

                return(true);
            });
        }
예제 #4
0
        /// <summary>
        /// Clean the specified except.
        /// </summary>
        /// <param name="except">Except.</param>
        public static void Clean(List <WindowBase> except)
        {
            WindowSystem.instance.currentWindows.RemoveAll((window) => {
                var result = WindowSystem.instance.DestroyWindowCheckOnClean_INTERNAL(window, except, null);

                if (result == true)
                {
                    if (window != null)
                    {
                        WindowBase.DestroyImmediate(window.gameObject);
                    }
                }

                return(result);
            });

            WindowSystem.RefreshHistory();
        }
예제 #5
0
        public static void Clean(List <WindowBase> except)
        {
            WindowSystem.instance.currentWindows.RemoveAll((window) => {
                if (window != null)
                {
                    if (except == null || !except.Contains(window))
                    {
                        WindowBase.DestroyImmediate(window.gameObject);
                        return(true);
                    }

                    return(false);
                }

                return(true);
            });

            WindowSystem.RefreshHistory();
        }