Пример #1
0
        public void OnShow()
        {
            gameObject.SetActive(true);

            if (PausesGame)
            {
                GameManager.Instance.PauseGame();
            }
            else
            {
                GameManager.Instance.UnpauseGame();
            }

            if (FreeMouse)
            {
                if (MouseHiddenUntilMove && GuiManager.CanHideMouseUntilMove())
                {
                    if (GuiManager.IsMouseFree())
                    {
                        GuiManager.TrapMouse();
                    }
                    StartCoroutine(MouseMoveHandler());
                    if (DefaultSelectable)
                    {
                        DefaultSelectable.Select();
                    }
                }
                else
                {
                    GuiManager.FreeMouse();
                }
            }
            else
            {
                GuiManager.TrapMouse();
            }
        }