private void OnClientReceiveMessage(LeaveMessage message) { DebugLog.All(message.PlayerName, "left"); PlayerJoin.PlayerNames.Remove(message.SenderId); foreach (var objectId in message.ObjectIds) { DestroyObject(objectId); } }
public void Leave(uint playerId, uint[] objectIds) { var message = new LeaveMessage { PlayerName = PlayerJoin.PlayerNames[playerId], SenderId = playerId, ObjectIds = objectIds }; _leaveHandler.SendToAll(message); }