Ejemplo n.º 1
0
 /// <summary>
 /// Call when a player has timed out.
 /// </summary>
 /// <param name="plr"></param>
 /// <param name="ex"></param>
 public virtual void PlayerTimeout(Player plr, ControllerTimeoutException ex)
 {
     PlayerTimeoutEvent ev = new PlayerTimeoutEvent(plr, ex);
     AppendEvent(ev);
     if (OnPlayerTimeout != null)
     {
         OnPlayerTimeout(this, ev);
     }
 }
Ejemplo n.º 2
0
 private void PlayerTimedOut(IDNumber plr, ControllerTimeoutException ex)
 {
     ApplyEvent(new PlayerTimeoutEvent(plr, ex));
     PlayerLose(plr);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Stores the information provided by the <paramref name="exception"/> and bases the <see cref="Event.Message"/>
 /// from it.
 /// </summary>
 /// <param name="exception">The <see cref="ControllerTimeoutException"/> generated by a <see cref="Player"/>.</param>
 public PlayerTimeoutEvent(IDNumber playerID, ControllerTimeoutException exception)
     : base(playerID)
 {
     TimeTaken = 500;
     Method = exception.MethodName;
 }