Inheritance: System.EventArgs
 private void ball_Scored(object sender, ScoreEventArgs e)
 {
     if (e.Side == Paddle.Side.Left)
     {
         ScoreLeft += 1;
     }
     else if (e.Side == Paddle.Side.Right)
     {
         ScoreRight += 1;
     }
     OnScored(e.Side, e.Ball);
     DispatcherHelper.CheckBeginInvokeOnUI(() =>
     {
         Balls.Remove(e.Ball);
         AddBall();
     });
 }
Exemple #2
0
 private void PongGame_Scored(object sender, ScoreEventArgs e)
 {
     RaisePropertyChanged("PongGame");
 }
Exemple #3
0
 private void ball_Scored(object sender, ScoreEventArgs e)
 {
     if (e.Side == Paddle.Side.Left)
     {
         ScoreLeft += 1;
     }
     else if (e.Side == Paddle.Side.Right)
     {
         ScoreRight += 1;
     }
     OnScored(e.Side, e.Ball);
     DispatcherHelper.CheckBeginInvokeOnUI(() =>
                                               {
                                                   Balls.Remove(e.Ball);
                                                   AddBall();
                                               });
 }