private void OnPlayerEntityNeeded(NewPlayerEntityNeededEventArgs e) { var handler = PlayerEntityNeeded; if (handler != null) { handler(this, e); } }
private ServerPlayerCharacterEntity GetNewPlayerEntity(ClientConnection clientConnection, uint entityId) { var eArgs = new NewPlayerEntityNeededEventArgs { Connection = clientConnection, EntityId = entityId }; OnPlayerEntityNeeded(eArgs); return(new ServerPlayerCharacterEntity( clientConnection, eArgs.PlayerEntity, _server )); }