Пример #1
0
 protected static void AddPing(PlayerNet playerNet, PlayerEntry entry, ref StringBuilder tempString)
 {
     tempString.Append("<color=" + PlayerUtils.GetPingColor(entry.ping) + ">");
     if (entry.ping < 9999 && entry.ping > -999)
     {
         tempString.Append(entry.ping.ToString().PadRight(4) + "ms</color>");
     }
     else
     {
         tempString.Append(((double)(entry.ping / 1000)).ToString("N1").PadRight(5) + "s</color>");
     }
     tempString.Append(separator);
 }
Пример #2
0
 private static void AddPing(Player player, LocalPlayerEntry entry, ref StringBuilder tempString)
 {
     entry.ping = (short)Photon.Pun.PhotonNetwork.field_Public_Static_LoadBalancingClient_0.prop_LoadBalancingPeer_0.RoundTripTime;
     tempString.Append("<color=" + PlayerUtils.GetPingColor(entry.ping) + ">");
     if (entry.ping < 9999 && entry.ping > -999)
     {
         tempString.Append(entry.ping.ToString().PadRight(4) + "ms</color>");
     }
     else
     {
         tempString.Append(((double)(entry.ping / 1000)).ToString("N1").PadRight(5) + "s</color>");
     }
     tempString.Append(separator);
 }