/// <summary> /// Syncs a new player that has just joined the server /// </summary> /// <param name="username"></param> /// <param name="identifier"></param> public void SyncNewPlayer(string username, short identifier) { ClientPlayer player = new ClientPlayer(username, identifier, assets); Players.Add(player); }
/// <summary> /// Moves a player in a certain direction /// </summary> /// <param name="identifier"></param> /// <param name="direction"></param> public void MovePlayer(short identifier, byte direction) { ClientPlayer player = Players.Find(ply => ply.Identifier == identifier); player.Move(direction); }
public void AddPlayer(ClientPlayer player) { players.Add(player); }