/// <summary> /// /// </summary> /// <param name="e"></param> protected virtual void OnMovePlayer(MovePlayerEventArgs e) { if (MovePlayer != null) { MovePlayer(this, e); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Participant_MovePlayer(object sender, MovePlayerEventArgs e) { Participant p = (Participant)sender; if (p.HasAuthority || p.ControlsPlayer(e.PlayerIndex)) { Players[e.PlayerIndex].SetMoveState(e.Direction, e.SecondaryDirection, e.Moving); } else { System.Diagnostics.Debug.Assert(false); } }