public void begin()
 {
     this.heightmapCopy = LandscapeHeightmapCopyPool.claim();
     for (int i = 0; i < Landscape.HEIGHTMAP_RESOLUTION; i++)
     {
         for (int j = 0; j < Landscape.HEIGHTMAP_RESOLUTION; j++)
         {
             this.heightmapCopy[i, j] = this.tile.sourceHeightmap[i, j];
         }
     }
 }
Пример #2
0
 // Token: 0x06000E18 RID: 3608 RVA: 0x00062F28 File Offset: 0x00061328
 protected void OnDestroy()
 {
     if (Landscape.instance == this)
     {
         GraphicsSettings.graphicsSettingsApplied -= this.handleGraphicsSettingsApplied;
         PlanarReflection.preRender  -= this.handlePlanarReflectionPreRender;
         PlanarReflection.postRender -= this.handlePlanarReflectionPostRender;
         Landscape.instance           = null;
         Landscape.clearTiles();
         LandscapeHeightmapCopyPool.empty();
         LandscapeSplatmapCopyPool.empty();
     }
 }
Пример #3
0
 // Token: 0x06000E16 RID: 3606 RVA: 0x00062E7C File Offset: 0x0006127C
 protected void Awake()
 {
     base.name             = "Landscape";
     base.gameObject.layer = LayerMasks.GROUND;
     if (Landscape.instance == null)
     {
         Landscape.instance = this;
         Landscape.clearTiles();
         if (Level.isEditor)
         {
             LandscapeHeightmapCopyPool.warmup(DevkitTransactionManager.historyLength);
             LandscapeSplatmapCopyPool.warmup(DevkitTransactionManager.historyLength);
         }
         GraphicsSettings.graphicsSettingsApplied += this.handleGraphicsSettingsApplied;
         PlanarReflection.preRender  += this.handlePlanarReflectionPreRender;
         PlanarReflection.postRender += this.handlePlanarReflectionPostRender;
     }
 }
 public void forget()
 {
     LandscapeHeightmapCopyPool.release(this.heightmapCopy);
 }