コード例 #1
0
 // Token: 0x06000047 RID: 71 RVA: 0x00005984 File Offset: 0x00003B84
 private void OnGUI()
 {
     try
     {
         this.guishit();
         Event current = Event.current;
         bool  flag    = current.isKey || current.isMouse;
         if (flag)
         {
             bool flag2 = Main.binds;
             if (flag2)
             {
                 Main.aimkey = current.keyCode;
                 Main.binds  = false;
             }
             bool flag3 = Main.binds2;
             if (flag3)
             {
                 Main.aimkey1 = current.keyCode;
                 Main.binds2  = false;
             }
         }
         bool drawFov = Config.Aimbot.DrawFov;
         if (drawFov)
         {
             Drawing1.DrawCircle(new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)), Main.distancefromcenter, new Color32(byte.MaxValue, 0, 0, byte.MaxValue), 1f, true, 30);
         }
         bool target = Config.ESP.target;
         if (target)
         {
             Dictionary <Player, int> dictionary = new Dictionary <Player, int>();
             Vector2 vector;
             vector..ctor((float)Screen.width / 2f, (float)Screen.height / 2f);
             Vector3 zero = Vector3.zero;
             foreach (GamePlayer gamePlayer in Misc.GamePlayers)
             {
                 int     num     = (int)Vector2.Distance(Misc.MainCamera.WorldToScreenPoint(gamePlayer.Player.PlayerBones.Head.position), vector);
                 int     num2    = (int)Vector3.Distance(Misc.LocalPlayer.Transform.position, gamePlayer.Player.Transform.position);
                 Vector3 vector2 = gamePlayer.Player.Transform.position - Misc.MainCamera.transform.position;
                 bool    flag4   = !Misc.friendsList.Contains(gamePlayer.Player.Profile.Info.Nickname) && !MonoBehaviourSingleton <PreloaderUI> .Instance.IsBackgroundBlackActive && (float)num2 <= Main.distancefrome && (float)num <= Main.distancefromcenter && Vector3.Dot(Misc.MainCamera.transform.TransformDirection(Vector3.forward), vector2) > 0f;
                 if (flag4)
                 {
                     dictionary.Add(gamePlayer.Player, num);
                 }
             }
             bool flag5 = (double)dictionary.Count > 0.01;
             if (flag5)
             {
                 dictionary = (from pair in dictionary
                               orderby pair.Value
                               select pair).ToDictionary((KeyValuePair <Player, int> pair) => pair.Key, (KeyValuePair <Player, int> pair) => pair.Value);
                 Player  player  = dictionary.Keys.First <Player>();
                 Vector3 vector3 = Camera.main.WorldToScreenPoint(player.Transform.position);
                 int     num3    = (int)Vector3.Distance(Misc.MainCamera.transform.position, player.Transform.position);
                 Vector3 vector4 = player.PlayerBones.Head.position + new Vector3(0f, 0.07246377f, 0f);
                 Vector3 vector5 = Camera.main.WorldToScreenPoint(player.PlayerBones.Head.position);
                 Weapon  weapon  = Misc.LocalPlayer.Weapon;
                 bool    flag6   = player.Profile.Info.Nickname == "Chasepasetson";
                 bool    flag7   = player.Profile.Info.Nickname == "HNICOS";
                 bool    flag8   = (double)vector5.z > 0.01 && weapon != null && !flag6 && !flag7;
                 if (flag8)
                 {
                     Drawing1.DrawLine(new Vector2((float)Screen.width / 2f, (float)Screen.height / 2f), new Vector2(vector5.x, (float)Screen.height - vector5.y), new Color32(byte.MaxValue, 0, 0, byte.MaxValue), 2f, true);
                 }
             }
         }
         bool crosshair = Config.Aimbot.Crosshair;
         if (crosshair)
         {
             Drawing1.DrawLine(new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2 - 9)), new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2 + 9)), Main.umcolor, 1f, true);
             Drawing1.DrawLine(new Vector2((float)(Screen.width / 2 - 9), (float)(Screen.height / 2)), new Vector2((float)(Screen.width / 2 + 9), (float)(Screen.height / 2)), Main.umcolor, 1f, true);
         }
         bool flag9 = Config.Aimbot.Aim && Input.GetKey(Main.aimkey);
         if (flag9)
         {
             this.Aim();
         }
     }
     catch
     {
     }
 }
コード例 #2
0
 // Token: 0x06000005 RID: 5 RVA: 0x000021E3 File Offset: 0x000003E3
 public static void DrawCircle(Vector2 center, float radius, Color color, float width, int segmentsPerQuarter)
 {
     Drawing1.DrawCircle(center, radius, color, width, false, segmentsPerQuarter);
 }