Пример #1
0
 public IntVec3 this[int index]
 {
     get
     {
         return(CellIndicesUtility.IndexToCell(this.grid[index], this.mapSizeX));
     }
     set
     {
         this.grid[index] = CellIndicesUtility.CellToIndex(value, this.mapSizeX);
     }
 }
Пример #2
0
 public void DebugDraw()
 {
     for (int i = 0; i < grid.Length; i++)
     {
         byte b = grid[i];
         if (b > 0)
         {
             CellRenderer.RenderCell(CellIndicesUtility.IndexToCell(i, mapSizeX), (float)(int)b / 255f * 0.5f);
         }
     }
 }
Пример #3
0
 public void DebugDraw()
 {
     for (int i = 0; i < grid.Length; i++)
     {
         int num = grid[i];
         if (num > 0)
         {
             CellRenderer.RenderCell(CellIndicesUtility.IndexToCell(i, mapSizeX), (float)(num % 100) / 100f * 0.5f);
         }
     }
 }
Пример #4
0
 public void DebugDraw()
 {
     for (int i = 0; i < this.grid.Length; i++)
     {
         int num = this.grid[i];
         if (num > 0)
         {
             IntVec3 c = CellIndicesUtility.IndexToCell(i, this.mapSizeX);
             CellRenderer.RenderCell(c, (float)((float)(num % 100) / 100.0 * 0.5));
         }
     }
 }
Пример #5
0
 public void DebugDraw()
 {
     for (int i = 0; i < this.grid.Length; i++)
     {
         byte b = this.grid[i];
         if (b > 0)
         {
             IntVec3 c = CellIndicesUtility.IndexToCell(i, this.mapSizeX);
             CellRenderer.RenderCell(c, (float)b / 255f * 0.5f);
         }
     }
 }
Пример #6
0
        private bool CellBoolDrawerGetBoolInt(int index)
        {
            IntVec3 c = CellIndicesUtility.IndexToCell(index, map.Size.x);

            if (c.Filled(map) || c.Fogged(map))
            {
                return(false);
            }
            TerrainAffordanceDef affordance;

            return(TryGetAffordanceDefToDraw(TerrainAt(index), out affordance));
        }
Пример #7
0
 public IntVec3 this[int x, int z]
 {
     get
     {
         int num = CellIndicesUtility.CellToIndex(x, z, this.mapSizeX);
         return(CellIndicesUtility.IndexToCell(this.grid[num], this.mapSizeX));
     }
     set
     {
         int num = CellIndicesUtility.CellToIndex(x, z, this.mapSizeX);
         this.grid[num] = CellIndicesUtility.CellToIndex(x, z, this.mapSizeX);
     }
 }
Пример #8
0
 public IntVec3 this[IntVec3 c]
 {
     get
     {
         int num = CellIndicesUtility.CellToIndex(c, this.mapSizeX);
         return(CellIndicesUtility.IndexToCell(this.grid[num], this.mapSizeX));
     }
     set
     {
         int num = CellIndicesUtility.CellToIndex(c, this.mapSizeX);
         this.grid[num] = CellIndicesUtility.CellToIndex(value, this.mapSizeX);
     }
 }
Пример #9
0
 public IntVec3 IndexToCell(int ind)
 {
     return(CellIndicesUtility.IndexToCell(ind, this.mapSizeX));
 }