Пример #1
0
 public void DrawDebugPowerNetGrid()
 {
     if (!DebugViewSettings.drawPowerNetGrid)
     {
         return;
     }
     if (Current.ProgramState != ProgramState.Playing)
     {
         return;
     }
     if (this.map != Find.CurrentMap)
     {
         return;
     }
     Rand.PushState();
     foreach (IntVec3 current in Find.CameraDriver.CurrentViewRect.ClipInsideMap(this.map))
     {
         PowerNet powerNet = this.netGrid[this.map.cellIndices.CellToIndex(current)];
         if (powerNet != null)
         {
             Rand.Seed = powerNet.GetHashCode();
             CellRenderer.RenderCell(current, Rand.Value);
         }
     }
     Rand.PopState();
 }
Пример #2
0
 public void DrawDebugPowerNetGrid()
 {
     if (DebugViewSettings.drawPowerNetGrid && Current.ProgramState == ProgramState.Playing && map == Find.CurrentMap)
     {
         Rand.PushState();
         foreach (IntVec3 item in Find.CameraDriver.CurrentViewRect.ClipInsideMap(map))
         {
             PowerNet powerNet = netGrid[map.cellIndices.CellToIndex(item)];
             if (powerNet != null)
             {
                 Rand.Seed = powerNet.GetHashCode();
                 CellRenderer.RenderCell(item, Rand.Value);
             }
         }
         Rand.PopState();
     }
 }