Example #1
0
    public void MainButtonFucntion()
    {
        switch (currentPanelTag)
        {
        case playerSelectionPanel:
            break;

        case noInternetPanel:
            playerSelection.TryAgainInternetConnection();
            break;

        case noMatPanel:
            if (System.Globalization.RegionInfo.CurrentRegion.ToString().Equals("IN", System.StringComparison.OrdinalIgnoreCase))
            {
                Application.OpenURL(ProductMessages.GetMatUrlIn);
            }
            else
            {
                Application.OpenURL(ProductMessages.GetMatUrlUS);
            }
            break;

        case launchFromYipliAppPanel:
            break;

        case maintanencePanel:
            if (currentIsMainTanenceModeOn)
            {
                // quit application.
                Application.Quit();
            }
            else
            {
                // update game
                playerSelection.OnUpdateGameClick();
            }
            break;

        case noMatConnectionPanel:
            matSelection.ReCheckMatConnection();
            break;

        case phoneHolderTutorialPanel:
            TurnMainButtonScaleToOne();
            playerSelection.OnJumpOnMat();
            break;

        case minimum2Player:
            playerSelection.OnGoToYipliPress();
            break;

        default:
            break;
        }
    }