/// <summary> /// Sends a message to the player about a particular action. /// </summary> /// <param name="actor">The player that committed the action.</param> /// <param name="action">The type of action.</param> public void SendAction(PlayerData actor, PlayerAction action, PlayerActionContext context) { var message = new ServerMessage.NotifyPlayerAction(actor, action, context); Socket.Send(message.AsJson()); }
public NotifyPlayerAction(PlayerData player, PlayerAction action, PlayerActionContext context) { Player = player; Action = action; Context = context; }