예제 #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));
 }