public void OnBallInPlay(BallEventArgs e) { EventHandler ballInPlay = BallInPlay; if (ballInPlay != null) { ballInPlay(this, e); } }
void ball_BallInPlay(object sender, EventArgs e) { if (e is BallEventArgs) { BallEventArgs ballEventArgs = e as BallEventArgs; if (ballEventArgs.Trajectory < 70 && ballEventArgs.Distance < 80) { Console.WriteLine("<Pitcher> Say, I gets it!!! ( ̄▽ ̄)~*"); } //Console.WriteLine($"<Pitcher> {ballEventArgs.Trajectory}, {ballEventArgs.Distance}"); } }
void ball_BallInPlay(object sender, EventArgs e) { if (e is BallEventArgs) { BallEventArgs ballEventArgs = e as BallEventArgs; if (ballEventArgs.Trajectory < 70 && ballEventArgs.Distance < 80) { Console.WriteLine("<Fan> O(≧▽≦)O, σ(≧ε≦o), ₍₍ ◝(●˙꒳˙●)◜ ₎₎,(〜^∇^)〜 "); } //Console.WriteLine($"<Fan> {ballEventArgs.Trajectory}, {ballEventArgs.Distance}"); } }
void ball_BallInPlay(object sender, EventArgs e) { if (e is BallEventArgs) { BallEventArgs ballEventArgs = e as BallEventArgs; if (ballEventArgs.Trajectory < 70 && ballEventArgs.Distance < 80) { Console.WriteLine("<Umpire> Say, Out !!! "); } //Console.WriteLine($"<Umpire> {ballEventArgs.Trajectory}, {ballEventArgs.Distance}"); } }