Exemple #1
0
            public static void Postfix(PingTracker __instance)
            {
                AspectPosition position = __instance.GetComponent <AspectPosition>();

                position.DistanceFromEdge = new Vector3(1.9f, 0.28f, 0);
                position.AdjustPosition();

                __instance.text.text = "<color=#FCCE03FF><size=120%>StreamHats</color></size>\n<color=#FCCE03FF><size=80%>by SideSxope</color>\n</size>";
                if (AmongUsClient.Instance.Ping < 100)
                {
                    __instance.text.text     += $"<size=60%>Ping: <color=#00FF00>{AmongUsClient.Instance.Ping}ms</color></size>\n";
                    __instance.text.alignment = TMPro.TextAlignmentOptions.BaselineRight;
                }
                else if (AmongUsClient.Instance.Ping < 200)
                {
                    __instance.text.text     += $"<size=60%>Ping: <color=#CCCC00>{AmongUsClient.Instance.Ping}ms</color></size>\n";
                    __instance.text.alignment = TMPro.TextAlignmentOptions.BaselineRight;
                }
                else if (AmongUsClient.Instance.Ping > 200)
                {
                    __instance.text.text     += $"<size=60%>Ping: <color=#FF0000>{AmongUsClient.Instance.Ping}ms</color></size>\n";
                    __instance.text.alignment = TMPro.TextAlignmentOptions.BaselineRight;
                }

                if (MeetingHud.Instance)
                {
                    __instance.text.alignment = TMPro.TextAlignmentOptions.BaselineRight;
                    __instance.text.margin    = new Vector4(0, 0, 0.5f, 0);
                    __instance.text.fontSize  = 3.0f;
                    __instance.text.transform.localPosition = new Vector3(0, 0, 0);
                    Vector3 topRight = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width, Screen.height));
                    __instance.text.transform.position = new Vector3(topRight.x - 0.1f, topRight.y - 1.8f);
                }
            }
 public static void Postfix(PingTracker __instance)
 {
     AspectPosition position = __instance.GetComponent<AspectPosition>();
     position.DistanceFromEdge = new Vector3(2.7f, 0.4f, 0);
     position.AdjustPosition();
     
     __instance.text.text = 
         $"<color=#00FF00FF>ProxyOfUs v1.0.4</color>\n" +
         $"Ping: {AmongUsClient.Instance.Ping}ms";
     
 }