Exemplo n.º 1
0
 private void GenerateDebugDrawPolygonNavmesh(MyPlanet planet, List <MyRecastDetourPolygon> polygons, MyOrientedBoundingBoxD centerOBB, Vector2I coords)
 {
     if (polygons != null)
     {
         List <MyFormatPositionColor> list = new List <MyFormatPositionColor>();
         int num  = 10;
         int num2 = 0;
         int num3 = 0x5f;
         int num4 = 10;
         using (List <MyRecastDetourPolygon> .Enumerator enumerator = polygons.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 foreach (Vector3 vector in enumerator.Current.Vertices)
                 {
                     MyFormatPositionColor item = new MyFormatPositionColor {
                         Position = (Vector3)this.LocalNavmeshPositionToWorldPosition(centerOBB, vector, this.Center, Vector3D.Zero),
                         Color    = new Color(0, num + num2, 0)
                     };
                     list.Add(item);
                 }
                 num2 = (num2 + num4) % num3;
             }
         }
         if (list.Count > 0)
         {
             this.m_newObbCoordsPolygons[coords] = list;
         }
     }
 }
Exemplo n.º 2
0
        private void GenerateDebugDrawPolygonNavmesh(MyPlanet planet, MyOrientedBoundingBoxD obb, List <MyFormatPositionColor> navmesh, int xCoord, int yCoord)
        {
            int num  = 10;
            int num2 = 0;
            int num3 = 0x5f;
            int num4 = 10;

            using (List <MyRecastDetourPolygon> .Enumerator enumerator = this.m_polygons.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    foreach (Vector3 vector in enumerator.Current.Vertices)
                    {
                        Vector3D vectord           = this.LocalNavmeshPositionToWorldPosition(obb, vector, this.m_meshCenter, Vector3D.Zero);
                        MyFormatPositionColor item = new MyFormatPositionColor {
                            Position = (Vector3)vectord,
                            Color    = new Color(0, num + num2, 0)
                        };
                        navmesh.Add(item);
                    }
                    num2 = (num2 + num4) % num3;
                }
            }
        }