private void OnLogin(MonoLoginPacket obj) { var midgard = LookupSystem<Midgard>(); var playerComponent = new PlayerComponent(obj.Connection); var entity = _playerSys.Add(playerComponent); RenderData renderData = (RenderData)ObjectMapper.Create((uint)entity.UniqueId, typeof(RenderData)); renderData.Set(midgard, entity, _monoServer.Content); entity.AddComponent(renderData); LoginResponsePacket packet = new LoginResponsePacket(); packet.OwnerEntityId = (uint)entity.UniqueId; _bifrost.Send(packet, obj.Connection); }
private void Bifrost_OnConnection(Asgard.Core.Network.NetNode connection) { var bifrost = LookupSystem<BifrostClient>(); MonoLoginPacket packet = new MonoLoginPacket(); bifrost.Send(packet); }