/// <summary> /// Called when [music button selected]. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="Ballerburg.Controls.ActionToggleButtonEventArgs"/> instance containing the event data.</param> private void OnMusicButtonSelected(object sender, ActionToggleButtonEventArgs e) { ScreenManager.AudioManager.PlayKlickSound(); int index = e.SelectedIndex; if (index == (int)BackgroundMusicTrack.Aus) { ScreenManager.ApplicationSettings.PlayMusic = false; musicVolumeSlider.State = States.Inactive; ScreenManager.AudioManager.StopMenuBackgroundMusic(); } else { ScreenManager.ApplicationSettings.ActiveBackgroundMusicTrack = (BackgroundMusicTrack)index; if (ScreenManager.ApplicationSettings.PlayMusic == false) { musicVolumeSlider.State = States.Visible; ScreenManager.ApplicationSettings.PlayMusic = true; ScreenManager.AudioManager.PlayMenuBackgroundMusic(); } else { ScreenManager.AudioManager.StopMenuBackgroundMusic(); ScreenManager.AudioManager.PlayMenuBackgroundMusic(); } } }
/// <summary> /// Set the players type: human or pc /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void ComputerMenuEntrySelected(object sender, ActionToggleButtonEventArgs e) { ScreenManager.AudioManager.PlayKlickSound(); playerSettings.PlayerType = (PlayerType)e.SelectedIndex; /* if (BallerburgGame.PlayerSettings[this.spielerNr - 1].PlayerType == Ballerburg.Gameplay.PlayerType.Human) { BallerburgGame.PlayerSettings[this.spielerNr - 1].PlayerType = Ballerburg.Gameplay.PlayerType.Computer; //this.computerMenuEntry.StateText = "An"; } else { BallerburgGame.PlayerSettings[this.spielerNr - 1].PlayerType = Ballerburg.Gameplay.PlayerType.Human; //this.computerMenuEntry.StateText = "Aus"; } * */ }
/// <summary> /// When the user presses this button, we go on to the screen for /// the network connection /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void ToggleNumPlayersMenuEntrySelected(object sender, ActionToggleButtonEventArgs e) { ScreenManager.AudioManager.PlayKlickSound(); GameSettings.NumPlayers = e.SelectedIndex + 2; for (var i = 0; i < GameSettings.NumPlayers; i++) { spielerActionButtons[i].SetActive(); } for (var i = GameSettings.NumPlayers; i < 4; i++) { spielerActionButtons[i].SetInactive(); } }