public void OnPointerClick(PointerEventData eventData)
 {
     if (buttonText != null)
     {
         buttonText.color = Color.gray;
     }
     ButtonClickSound.Play();
 }
Beispiel #2
0
        public bool LeftClick(MouseState mouseState)
        {
            if (mouseState.LeftButton == ButtonState.Pressed)
            {
                ButtonClickSound.Play(0.5f);
                ButtonClickSound.Wait = true;
            }
            else if (mouseState.LeftButton == ButtonState.Released)
            {
                ButtonClickSound.Wait = false;
            }

            return(ButtonClickSound.Wait);
        }
Beispiel #3
0
 private void Btn_Options_Click(object sender, RoutedEventArgs e)
 {
     ButtonClickSound.Play();
     this.NavigationService.Navigate(new Option());
 }
Beispiel #4
0
 private void Btn_New_How_To_Play_Click(object sender, RoutedEventArgs e)
 {
     ButtonClickSound.Play();
     this.NavigationService.Navigate(new HowToPlay());
 }
Beispiel #5
0
 private void Ranking_Click(object sender, RoutedEventArgs e)
 {
     ButtonClickSound.Play();
     this.NavigationService.Navigate(new Ranking());
 }
Beispiel #6
0
 private void New_game_Click(object sender, RoutedEventArgs e)
 {
     ButtonClickSound.Play();
     this.NavigationService.Navigate(new NewGame());
 }
Beispiel #7
0
 private void Exit_Click(object sender, RoutedEventArgs e)
 {
     ButtonClickSound.Play();
     Application.Current.Shutdown();
 }