Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Sounds.menuSound.Play();
            if (Form1.chosenPacmanCharacter == Pacman.Character.ChristmasPacman &&
                Form1.chosenGhostCharacter == Ghost.Character.Christmas)
            {
                SetMusic("Jingle");
            }
            else
            {
                switch (Form1.chosenGameMode)
                {
                case Form1.GameMode.Normal:
                    SetMusic("Valor");
                    break;

                case Form1.GameMode.Turbo:
                    SetMusic("Authority");
                    break;

                case Form1.GameMode.Fruit:
                    SetMusic("Odds");
                    break;
                }
            }

            menu.Hide();
            panel1.Hide();
            activeGame          = new Form1(this);
            activeGame.TopLevel = false;
            this.Controls.Add(activeGame);
            activeGame.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            activeGame.Left            = (this.ClientSize.Width - activeGame.Width) / 2;
            activeGame.Show();
            activeGame.Focus();
            activeGame.KeyPreview = true;
            setPause();
            Form1.startGame();
        }