Ejemplo n.º 1
0
        /// <summary>
        /// Open or Close cheats menu.
        /// </summary>
        private void toggleCheatMenu(bool Flag)
        {
            if (Flag)
            {
                selectCheatButton.Margin = new Thickness(0, 126, 140, 0);
                selectedCheat            = 0;
                titleScreen.Visibility   = Visibility.Collapsed;
                cheatsScreen.Visibility  = Visibility.Visible;
                currentGameState         = GameState.CheatScreen;
            }

            else
            {
                cheatsScreen.Visibility = Visibility.Collapsed;
                titleScreen.Visibility  = Visibility.Visible;
                currentGameState        = GameState.TitleScreen;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Toggles the currently selected cheat.
        /// </summary>
        /// <param name="cheat"></param>
        private void ToggleCheat(CheatScreenOption cheat)
        {
            cheatBools[(int)cheat] = !cheatBools[(int)cheat];
            cheatFlag = true;

            switch ((int)cheat)
            {
            // Inf Spin.
            case 0:
                cheat0.Text = cheatBools[0].ToString();
                if (cheatBools[0])
                {
                    cheat0.Foreground = new SolidColorBrush(Colors.Lime);
                }

                else
                {
                    cheat0.Foreground = new SolidColorBrush(Colors.Red);
                }
                break;

            // Ghost Block.
            case 1:
                cheat1.Text = cheatBools[1].ToString();
                if (cheatBools[1])
                {
                    cheat1.Foreground = new SolidColorBrush(Colors.Lime);
                }

                else
                {
                    cheat1.Foreground = new SolidColorBrush(Colors.Red);
                }
                break;

            // Choose Block.
            case 2:
                cheat2.Text = cheatBools[2].ToString();
                if (cheatBools[2])
                {
                    cheat2.Foreground = new SolidColorBrush(Colors.Lime);
                }

                else
                {
                    cheat2.Foreground = new SolidColorBrush(Colors.Red);
                }
                break;

            // Max Score.
            case 3:
                cheat3.Text = cheatBools[3].ToString();
                if (cheatBools[3])
                {
                    cheat3.Foreground = new SolidColorBrush(Colors.Lime);
                }

                else
                {
                    cheat3.Foreground = new SolidColorBrush(Colors.Red);
                }
                break;

            // Break.
            default:
                break;
            }
        }