Exemple #1
0
    private void UpdateBackBtn()
    {
        if (false == Input.GetKeyDown(KeyCode.Escape))
        {
            return;
        }

        //if (GameManager.IsNetworkLoading)
        //	return;

        UIPopup popup = GetTopPopup();

        if (popup != null)
        {
            if (popup.IsEnableBackBtn)
            {
                popup.OnBackKeyEvent();
            }
        }
        else
        {
            //switch (GameManager.instance.CurrentState)
            //{
            //case GameManager.GameState.LOBBY: UIManager.ExitGameDialog(Application.Quit); break;
            //case GameManager.GameState.SLOT:
            //	{
            //		if (BaseSlotManager.a.GetState() == (int)BaseSlotManager.GameState.READY && !BaseSlotManager.a.IsFreeSpinMode)
            //			UIManager.ExitToLobbyDialog(GameManager.instance.BackToLobby);
            //	}
            //	break;
            //}
        }
    }