Exemplo n.º 1
0
        private void PlayButton_Click(object sender, RoutedEventArgs e)
        {
            //DifficultyPage diffPage = new DifficultyPage();
            //this.Content = diffPage;

            // Run code to open difficulty selection and map selection window
            // If page closes without finishing, return;
            // else:
            // Start Game with current variables and selections

            // For Alpha, just launch Game Window

            soundHandler.Play(null, "menubutton");
            DifficultyPage diffPage = new DifficultyPage(soundHandler);

            this.Content = diffPage;
        }
Exemplo n.º 2
0
        private void BtnMainMenu_Click(object sender, RoutedEventArgs e)
        {
            // Event Handler for pressing the "Main Menu" btn
            // Returns: nothing
            // Params:
            // - object sender : not used. Only for enabling method as an Event Handler
            // - RoutedEventArgs e  : not used. Only for enabling method as an Event Handler

            // Plays the sound, opens a new main menu and closes the current window.

            soundHandler.Play(null, "backbutton");
            MainMenu mainMenu = new MainMenu(soundHandler);

            mainMenu.Show();
            Window.GetWindow(this).Close();
        }