Exemplo 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);
            }
        }
 /// <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;
 }
Exemplo n.º 3
0
 private void PlayerTimedOut(IDNumber plr, ControllerTimeoutException ex)
 {
     ApplyEvent(new PlayerTimeoutEvent(plr, ex));
     PlayerLose(plr);
 }
 /// <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="ControllerUser"/>.</param>
 public ControllerTimeoutEvent(ControllerTimeoutException exception)
     : base(exception.Register.ID)
 {
     Init(exception.Register, exception.TimeTaken, exception.MethodName);
 }