Exemplo n.º 1
0
        public void OnFoldoutPress(bool isDown)
        {
            if (!isDown)
            {
                ButtonSound("Default");

                // all buttons close the panel - even the close one ;)
                TacoManager.CloseFoldout();

                // do the other stuff they do
                switch (name)
                {
                case "LogoutButton":


                    TacoManager.AskToLogoutUser();
                    break;

                case "TournamentsButton":

                    TacoManager.ShowPanel(PanelNames.MyTournamentsPanel);
                    break;

                case "AddFundsButton":
                    TacoManager.ShowPanel(PanelNames.AddFundsPanel);
                    break;

                case "WithdrawFundsButton":
                    TacoManager.ShowPanel(PanelNames.WithdrawFundsPanel);
                    break;

                case "CreateTournamentButton":

                    TacoManager.ShowPanel(PanelNames.CreatePublicPanel);

                    break;

                case "OtherGamesButton":

                    TacoManager.ShowPanel(PanelNames.FeaturedGamesPanel);

                    break;

                case "AddGTokenButton":

                    TacoManager.ShowPanel(PanelNames.AddGTokensPanel);

                    break;

                case "PrizesButton":
                    TacoManager.ShowPanel(PanelNames.PrizesPanel);
                    break;
                }
            }
        }
Exemplo n.º 2
0
        public void OnFoldoutPress(bool isDown)
        {
            if (!isDown)
            {
                ButtonSound("Default");
                // all buttons close the panel - even the close one ;)
                TacoManager.CloseFoldout();
                // do the other stuff they do
                switch (name)
                {
                case "SignIn":
                    TacoManager.ShowPanel(PanelNames.LoginPanel);
                    break;

                case "SignUp":
                    TacoManager.ShowPanel(PanelNames.RegisterPanel);
                    break;

                case "StartMenu":
                case "GameStart":
                    TacoSetup.Instance.ToMainMenu();
                    TacoManager.CloseTaco();
                    break;

                case "AllOurGames":
                    //TacoManager.ShowPanel(PanelNames.FeaturedGamesPanel);
                    Application.OpenURL(Constants.BaseUrl + "games");
                    break;

                case "QuitApp":
                    Application.Quit();
                    break;

                case "HowGameWorks":
                    TacoSetup.Instance.LogEvent("how_it_work");
                    TacoModalManager.Instance.ToHowToPlay0(false);
                    break;

                case "ViewProfile":
                    if (TacoManager.User != null)
                    {
                        TacoManager.ShowPanel(PanelNames.ProfilePanel);
                    }
                    break;

                case "ContactUs":
                    Application.OpenURL(Constants.BaseUrl + "contact");
                    break;

                case "LogoutButton":
                    TacoManager.AskToLogoutUser();
                    break;

                case "TournamentsButton":
                    TacoManager.ShowPanel(PanelNames.MyTournamentsPanel);
                    break;

                case "CreateTournamentButton":
                    TacoManager.ShowPanel(PanelNames.CreatePublicPanel);
                    break;

                case "UserFundFoldout":
                    Application.OpenURL(Constants.BaseUrl);
                    break;

                case "UserTokenFoldout":
                    Application.OpenURL(Constants.BaseUrl + "addtokens");
                    break;

                case "UserPointFoldout":
                    Application.OpenURL(Constants.BaseUrl + "prizes");
                    break;

                case "ProfileButton":
                    Application.OpenURL(Constants.BaseUrl + "account");
                    break;
                }
            }
        }