Exemple #1
0
        public static void OnIncreaseCurrency()
        {
            GameData.AddCurrency(GameData.AddedCurrency);

            var counter = GameObject.Find("CounterText");

            counter.GetComponent <Animation>().Play();
        }
        public static void CheatPanel()
        {
            if (NeedShowPanel)
            {
                var panelRect = new Rect(PanelX, PanelY, PanelWidth, PanelHeight);
                GUI.Box(panelRect, PanelName);

                var buttonScorePlusRect = new Rect(button11PosX, button11PosY, ButtonWidth, ButtonHeight);
                if (GUI.Button(buttonScorePlusRect, "+1 Score"))
                {
                    GameData.IncreaseScore();
                    ButtonClicked = true;
                }

                var buttonScoreMinusRect = new Rect(button21PosX, button21PosY, ButtonWidth, ButtonHeight);
                if (GUI.Button(buttonScoreMinusRect, "-1 Score"))
                {
                    --Profile.Data.Score;
                    ButtonClicked = true;
                }

                var buttonResetScoreRect = new Rect(button31PosX, button31PosY, ButtonWidth, ButtonHeight);
                if (GUI.Button(buttonResetScoreRect, "Reset Score"))
                {
                    Profile.Data.Score = 0;
                    ButtonClicked      = true;
                }

                var buttonCurrencyPlusRect = new Rect(button12PosX, button12PosY, ButtonWidth, ButtonHeight);
                if (GUI.Button(buttonCurrencyPlusRect, "+1 Currency"))
                {
                    GameData.AddCurrency();
                    ButtonClicked = true;
                }

                var buttonCurrencyMinusRect = new Rect(button22PosX, button22PosY, ButtonWidth, ButtonHeight);
                if (GUI.Button(buttonCurrencyMinusRect, "-1 Currency"))
                {
                    GameData.ReduceCurrency();
                    ButtonClicked = true;
                }

                var buttonResetCurrencyRect = new Rect(button32PosX, button32PosY, ButtonWidth, ButtonHeight);
                if (GUI.Button(buttonResetCurrencyRect, "Reset Currency"))
                {
                    Profile.Data.Currency = 0;
                    ButtonClicked         = true;
                }

                var buttonResetProgressRect = new Rect(button13PosX, button13PosY, ButtonWidth, ButtonHeight);
                if (GUI.Button(buttonResetProgressRect, "Reset Proress"))
                {
                    Profile.Settings.NeedResetSettings = true;
                    ButtonClicked = true;
                    GameData.RestartGame();
                }
            }
        }