Exemplo n.º 1
0
 private void SendPacket(CCC_Packet packet)
 {
     if (client.Connected)
     {
         try
         {
             client.Send(packet);
         }
         catch (Exception)
         {
             HUDManagment.SetConnectionStatus(ConnectionStatus.Lost);
         }
     }
     else
     {
         HUDManagment.SetConnectionStatus(ConnectionStatus.NotConnected);
     }
 }
Exemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     if (HUDTestEnabled)
     {
         if (testConnectionDisplayMain)
         {
             HUDManagment.SetConnectionStatus(connectionStatus);
         }
         if (testWeaponDisplayMain)
         {
             HUDManagment.SetWeaponInfo(weaponname, currentAmmo, maxAmmo);
             HUDManagment.SetFireMode(fireMode);
         }
         if (testHealthDisplayMain)
         {
             HUDManagment.SetPlayerInfo(playerName);
             HUDManagment.SetPlayerHealth(currentHealth);
             HUDManagment.SetPlayerArmor(currentAmour);
             HUDManagment.SetPlayerColor(playerColor);
         }
     }
 }
Exemplo n.º 3
0
 private void OnTimeout(byte[] data)
 {
     HUDManagment.SetConnectionStatus(ConnectionStatus.TimeOut);
 }