Ejemplo n.º 1
0
 public static void PlayerHp(Player _player)
 {
     using (Packet _packet = new Packet((int)ServerPackets.playerHp)) {
         _packet.Write(_player.id);
         _packet.Write(_player.getHp());
         SendUDPDataToAll(_packet);
     }
 }
Ejemplo n.º 2
0
 public static void SpawnPlayer(Player _player)
 {
     using (Packet _packet = new Packet((int)ServerPackets.spawnPlayer)) {
         _packet.Write(_player.id);
         _packet.Write(_player.username);
         _packet.Write(_player.getHp());
         _packet.Write(_player.position);
         _packet.Write(_player.rotation);
         SendTCPDataToAll(_packet);
     }
 }
Ejemplo n.º 3
0
 public void updateObject(Player _player)
 {
     using (Packet _packet = new Packet((int)ServerPackets.updateObject)) {
         _packet.Write(_player.type);
         _packet.Write(_player.id);
         _packet.Write(_player.position);
         _packet.Write(_player.rotation);
         _packet.Write(_player.getHp());
         SendUDPDataToAll(_packet);
     }
 }
Ejemplo n.º 4
0
 public void spawnObject(Player _object)
 {
     using (Packet _packet = new Packet((int)ServerPackets.spawnObject)) {
         _packet.Write(_object.type);
         _packet.Write(_object.id);
         _packet.Write(_object.position);
         _packet.Write(_object.rotation);
         _packet.Write(_object.username);
         _packet.Write(_object.getHp());
         SendTCPDataToAll(_packet);
     }
 }