Exemplo n.º 1
0
 public void SendDestroyObject(GameObject o)
 {
     using (var pak = new PacketOut(eServerPackets.PlayerDestroy))
     {
         pak.WriteInt((uint)o.ObjectID);
         SendTCP(pak);
     }
 }
Exemplo n.º 2
0
 public void SendHello()
 {
     using (var pak = new PacketOut(eServerPackets.Hello))
     {
         pak.WriteInt(5);
         pak.WriteFloat(3.1415f);
         pak.WriteString("Hello this is a test string.");
         pak.WriteFloat(2014.512f);
         SendTCP(pak);
     }
 }
Exemplo n.º 3
0
 public void SendCreateObject(GameObject o)
 {
     using (var pak = new PacketOut(eServerPackets.PlayerCreate))
     {
         pak.WriteInt((uint)o.ObjectID);
         pak.WriteFloat(o.Position.X);
         pak.WriteFloat(o.Position.Y);
         pak.WriteFloat(o.Position.Z);
         SendTCP(pak);
     }
     Console.WriteLine("Client: " + this._client.Index + " added object " + o.ObjectID);
 }
Exemplo n.º 4
0
 public void SendMovementUpdate(GameObject o)
 {
     using (var pak = new PacketOut(eServerPackets.PlayerPosition))
     {
         pak.WriteInt((uint)o.ObjectID);
         pak.WriteFloat(o.Position.X);
         pak.WriteFloat(o.Position.Y);
         pak.WriteFloat(o.Position.Z);
         pak.WriteFloat(o.Velocity.X);
         pak.WriteFloat(o.Velocity.Y);
         pak.WriteFloat(o.Velocity.Z);
         SendTCP(pak);
     }
 }
Exemplo n.º 5
0
 public void SendRotationUpdate(GameObject o)
 {
     using (var pak = new PacketOut(eServerPackets.PlayerRotation))
     {
         pak.WriteInt((uint)o.ObjectID);
         pak.WriteFloat(o.Rotation.X);
         pak.WriteFloat(o.Rotation.Y);
         pak.WriteFloat(o.Rotation.Z);
         SendTCP(pak);
     }
 }