コード例 #1
0
 /// <summary>
 /// Display message.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 void PlayerMsgOnCol(object sender, RouletteSpinEventArgs e)
 {
     if (e.Color == Color)
     {
         Console.WriteLine($"GOTCHA! {Name} got the color!");
     }
 }
コード例 #2
0
 /// <summary>
 /// Display message.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 void PlayerMsgOnNum(object sender, RouletteSpinEventArgs e)
 {
     if (e.Number == Number)
     {
         Console.WriteLine($"GOTCHA! {Name} got the number!");
     }
 }
コード例 #3
0
 protected virtual void OnNewSpecifiedCol(object sender, RouletteSpinEventArgs e)
 {
     OnSpecColor?.Invoke(sender, e);
 }
コード例 #4
0
 protected virtual void OnNewSpin(object sender, RouletteSpinEventArgs e)
 {
     OnNewSpecifiedCol(this, new RouletteSpinEventArgs(number, color));
     OnNewSpecifiedNumber(this, new RouletteSpinEventArgs(number, color));
 }