Exemple #1
0
 public void HitTheBall(BallEventArgs e)
 {
     if (hitBallCallback != null)
     {
         hitBallCallback(e);
     }
 }
Exemple #2
0
 public void OnBallInPlay(BallEventArgs e)
 {
     if (BallInPlay != null)
     {
         BallInPlay(this, e);
     }
 }
Exemple #3
0
        public void playBall_Click()
        {
            Bat bat = GetNewBat();

            BallEventArgs ballEventArgs = new BallEventArgs();
            bat.HitTheBall(ballEventArgs);
        }
Exemple #4
0
        static void Main(string[] args)
        {
            Ball ball = new Ball();
            Pitcher pitcher = new Pitcher(ball);

            BallEventArgs ballEventArgs = new BallEventArgs(59, 94);

            ball.OnBallInPlay(ballEventArgs);
        }