public void HandlePacket(BaseClient client, BasePacketIn packet) { if (!(client is GameClient)) return; GameClient c = client as GameClient; if (c.Player == null) return; int x = (int)packet.ReadInt(); short y = (short)packet.ReadShort(); }
public void HandlePacket(BaseClient client, BasePacketIn packet) { if (!(client is GameClient)) return; GameClient c = client as GameClient; if (c.Player == null) return; c.Player.Rotation.X = packet.ReadInt(); c.Player.Rotation.Y = packet.ReadInt(); c.Player.Rotation.Z = packet.ReadInt(); }
public void HandlePacket(BaseClient client, BasePacketIn packet) { if (!(client is GameClient)) return; GameClient c = client as GameClient; if (c.Player == null) return; c.Player.Position.X = (float)packet.ReadInt(); c.Player.Position.Y = (float)packet.ReadInt(); c.Player.Position.Z = (float)packet.ReadInt(); //Console.WriteLine(c.Index + " " + c.Player.X + " " + c.Player.Y + " " + c.Player.Z); }
public AbstractPacketLib(BaseClient client) { _client = client; }
protected virtual BaseClient onClientConnect(TcpClient tcpClient) { BaseClient client = new BaseClient(tcpClient); return client; }