示例#1
0
 // Token: 0x0600B843 RID: 47171 RVA: 0x003AEED4 File Offset: 0x003AD0D4
 public void DrawLine(Player player, Vector2 screen)
 {
     try
     {
         Vector3 vector = Camera.main.WorldToScreenPoint(player.PlayerBones.RootJoint.position);
         if (vector.z >= 0.01f)
         {
             GUIHelper2.DrawLine(screen, new Vector2(vector.x, (float)Screen.height - vector.y), 2f, player.IsVisible ? Color.green : Color.red);
         }
     }
     catch
     {
     }
 }
示例#2
0
 // Token: 0x0600B841 RID: 47169 RVA: 0x003AE620 File Offset: 0x003AC820
 private static void smethod_0(Dictionary <EHumanBones, Vector3> dictionary_0, EHumanBones ehumanBones_0, EHumanBones ehumanBones_1)
 {
     try
     {
         if (dictionary_0.ContainsKey(ehumanBones_0) && dictionary_0.ContainsKey(ehumanBones_1))
         {
             Vector3 vector = dictionary_0[ehumanBones_0];
             if (vector.z >= 0.01f)
             {
                 Vector3 vector2 = dictionary_0[ehumanBones_1];
                 if (vector2.z >= 0.01f)
                 {
                     GUIHelper2.DrawLine(vector, vector2, 1f, Color.red);
                 }
             }
         }
     }
     catch
     {
     }
 }
示例#3
0
 // Token: 0x0600B85C RID: 47196 RVA: 0x003AF59C File Offset: 0x003AD79C
 public static void Draw3DBox(Bounds bounds, int width, Color color)
 {
     try
     {
         Camera  main    = Camera.main;
         float   num     = (float)Screen.height;
         Vector3 vector  = bounds.min + new Vector3(bounds.size.x, 0f, 0f);
         Vector3 vector2 = vector + new Vector3(0f, bounds.size.y, 0f);
         Vector3 vector3 = vector + new Vector3(0f, 0f, bounds.size.z);
         Vector3 max     = bounds.max;
         Vector3 min     = bounds.min;
         Vector3 vector4 = bounds.min + new Vector3(0f, bounds.size.y, 0f);
         Vector3 vector5 = bounds.min + new Vector3(0f, 0f, bounds.size.z);
         Vector3 vector6 = vector5 + new Vector3(0f, bounds.size.y, 0f);
         Vector3 vector7 = main.WorldToScreenPoint(vector);
         vector7.y = num - vector7.y;
         Vector3 vector8 = main.WorldToScreenPoint(vector2);
         vector8.y = num - vector8.y;
         Vector3 vector9 = main.WorldToScreenPoint(vector3);
         vector9.y = num - vector9.y;
         Vector3 vector10 = main.WorldToScreenPoint(max);
         vector10.y = num - vector10.y;
         Vector3 vector11 = main.WorldToScreenPoint(min);
         vector11.y = num - vector11.y;
         Vector3 vector12 = main.WorldToScreenPoint(vector4);
         vector12.y = num - vector12.y;
         Vector3 vector13 = main.WorldToScreenPoint(vector5);
         vector13.y = num - vector13.y;
         Vector3 vector14 = main.WorldToScreenPoint(vector6);
         vector14.y = num - vector14.y;
         bool[] array = new bool[]
         {
             vector7.z >= 0.01f,
             vector8.z >= 0.01f,
             vector9.z >= 0.01f,
             vector10.z >= 0.01f,
             vector11.z >= 0.01f,
             vector12.z >= 0.01f,
             vector13.z >= 0.01f,
             vector14.z >= 0.01f
         };
         if (array[0] && array[1])
         {
             GUIHelper2.DrawLine(vector7, vector8, (float)width, color);
         }
         if (array[0] && array[2])
         {
             GUIHelper2.DrawLine(vector7, vector9, (float)width, color);
         }
         if (array[0] && array[4])
         {
             GUIHelper2.DrawLine(vector7, vector11, (float)width, color);
         }
         if (array[1] && array[3])
         {
             GUIHelper2.DrawLine(vector8, vector10, (float)width, color);
         }
         if (array[1] && array[5])
         {
             GUIHelper2.DrawLine(vector8, vector12, (float)width, color);
         }
         if (array[2] && array[3])
         {
             GUIHelper2.DrawLine(vector9, vector10, (float)width, color);
         }
         if (array[2] && array[6])
         {
             GUIHelper2.DrawLine(vector9, vector13, (float)width, color);
         }
         if (array[4] && array[5])
         {
             GUIHelper2.DrawLine(vector11, vector12, (float)width, color);
         }
         if (array[4] && array[6])
         {
             GUIHelper2.DrawLine(vector11, vector13, (float)width, color);
         }
         if (array[7] && array[3])
         {
             GUIHelper2.DrawLine(vector14, vector10, (float)width, color);
         }
         if (array[7] && array[5])
         {
             GUIHelper2.DrawLine(vector14, vector12, (float)width, color);
         }
         if (array[7] && array[6])
         {
             GUIHelper2.DrawLine(vector14, vector13, (float)width, color);
         }
     }
     catch
     {
     }
 }
示例#4
0
 // Token: 0x0600B842 RID: 47170 RVA: 0x003AE6A0 File Offset: 0x003AC8A0
 public void DrawBoxes(Player player)
 {
     try
     {
         List <Transform> list = player.PlayerBody.SkeletonRootJoint.Bones.Values.ToList <Transform>();
         if (list.Count != 0)
         {
             Vector3 vector  = list[0].position;
             Vector3 vector2 = vector;
             list.RemoveAt(0);
             for (int i = 0; i < list.Count; i++)
             {
                 Transform transform = list[i];
                 if (!(transform == null) && CPlayer.list_0.Contains((EHumanBones)i))
                 {
                     Vector3 position = transform.position;
                     if (vector.x > position.x)
                     {
                         vector.x = position.x;
                     }
                     if (vector.y > position.y)
                     {
                         vector.y = position.y;
                     }
                     if (vector.z > position.z)
                     {
                         vector.z = position.z;
                     }
                     if (vector2.x < position.x)
                     {
                         vector2.x = position.x;
                     }
                     if (vector2.y < position.y)
                     {
                         vector2.y = position.y;
                     }
                     if (vector2.z < position.z)
                     {
                         vector2.z = position.z;
                     }
                 }
             }
             Vector3[] array = new Vector3[]
             {
                 new Vector3(vector.x, vector.y, vector.z),
                 new Vector3(vector2.x, vector.y, vector.z),
                 new Vector3(vector.x, vector.y, vector2.z),
                 new Vector3(vector2.x, vector.y, vector2.z),
                 new Vector3(vector.x, vector2.y, vector.z),
                 new Vector3(vector2.x, vector2.y, vector.z),
                 new Vector3(vector.x, vector2.y, vector2.z),
                 new Vector3(vector2.x, vector2.y, vector2.z)
             };
             Camera    main   = Camera.main;
             Vector3[] array2 = new Vector3[8];
             for (int j = 0; j < 8; j++)
             {
                 array2[j]   = main.WorldToScreenPoint(array[j]);
                 array2[j].y = (float)Screen.height - array2[j].y;
             }
             if (CPlayer.bDraw3DBox)
             {
                 if (array2[0].z > 0.01f && array2[1].z > 0.01f)
                 {
                     GUIHelper2.DrawLine(array2[0], array2[1], 2f, Color.red);
                 }
                 if (array2[0].z > 0.01f && array2[2].z > 0.01f)
                 {
                     GUIHelper2.DrawLine(array2[0], array2[2], 2f, Color.red);
                 }
                 if (array2[1].z > 0.01f && array2[3].z > 0.01f)
                 {
                     GUIHelper2.DrawLine(array2[1], array2[3], 2f, Color.red);
                 }
                 if (array2[2].z > 0.01f && array2[3].z > 0.01f)
                 {
                     GUIHelper2.DrawLine(array2[2], array2[3], 2f, Color.red);
                 }
                 if (array2[4].z > 0.01f && array2[5].z > 0.01f)
                 {
                     GUIHelper2.DrawLine(array2[4], array2[5], 2f, Color.red);
                 }
                 if (array2[4].z > 0.01f && array2[6].z > 0.01f)
                 {
                     GUIHelper2.DrawLine(array2[4], array2[6], 2f, Color.red);
                 }
                 if (array2[5].z > 0.01f && array2[7].z > 0.01f)
                 {
                     GUIHelper2.DrawLine(array2[5], array2[7], 2f, Color.red);
                 }
                 if (array2[6].z > 0.01f && array2[7].z > 0.01f)
                 {
                     GUIHelper2.DrawLine(array2[6], array2[7], 2f, Color.red);
                 }
                 if (array2[0].z > 0.01f && array2[4].z > 0.01f)
                 {
                     GUIHelper2.DrawLine(array2[0], array2[4], 2f, Color.red);
                 }
                 if (array2[1].z > 0.01f && array2[5].z > 0.01f)
                 {
                     GUIHelper2.DrawLine(array2[1], array2[5], 2f, Color.red);
                 }
                 if (array2[2].z > 0.01f && array2[6].z > 0.01f)
                 {
                     GUIHelper2.DrawLine(array2[2], array2[6], 2f, Color.red);
                 }
                 if (array2[3].z > 0.01f && array2[7].z > 0.01f)
                 {
                     GUIHelper2.DrawLine(array2[3], array2[7], 2f, Color.red);
                 }
             }
             if (CPlayer.bDraw2DBox)
             {
                 vector  = array2[0];
                 vector2 = vector;
                 for (int k = 1; k < 8; k++)
                 {
                     if (array2[k].z >= 0.01f)
                     {
                         if (vector.x > array2[k].x)
                         {
                             vector.x = array2[k].x;
                         }
                         if (vector.y > array2[k].y)
                         {
                             vector.y = array2[k].y;
                         }
                         if (vector2.x < array2[k].x)
                         {
                             vector2.x = array2[k].x;
                         }
                         if (vector2.y < array2[k].y)
                         {
                             vector2.y = array2[k].y;
                         }
                     }
                 }
                 Vector2[] array3 = new Vector2[]
                 {
                     new Vector3(vector.x, vector.y),
                     new Vector3(vector2.x, vector.y),
                     new Vector3(vector.x, vector2.y),
                     new Vector3(vector2.x, vector2.y)
                 };
                 GUIHelper2.DrawLine(array3[0], array3[1], 2f, Color.red);
                 GUIHelper2.DrawLine(array3[0], array3[2], 2f, Color.red);
                 GUIHelper2.DrawLine(array3[2], array3[3], 2f, Color.red);
                 GUIHelper2.DrawLine(array3[3], array3[1], 2f, Color.red);
             }
         }
     }
     catch
     {
     }
 }