public override void Hide()
        {
            bool wasVisible = (CurrentState == State.Visible);

            // Call base function
            base.Hide();

            if (wasVisible == true)
            {
                // Lock the cursor to what the scene is set to
                SceneTransitionManager manager = Singleton.Get <SceneTransitionManager>();

                // Return to the menu
                manager.LoadMainMenu();
            }
        }
Exemple #2
0
        public override void Hide()
        {
            bool wasVisible = (CurrentState == State.Visible);

            // Call base function
            base.Hide();

            if (wasVisible == true)
            {
                // Lock the cursor to what the scene is set to
                SceneTransitionManager manager = Singleton.Get <SceneTransitionManager>();
                //SceneManager.CursorMode = manager.CurrentScene.LockMode;

                // Unbind to Singleton's update function
                if (checkInput != null)
                {
                    Singleton.Instance.OnUpdate -= checkInput;
                    checkInput = null;
                }

                // Return to the menu
                manager.LoadMainMenu();
            }
        }