Ejemplo n.º 1
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();
     }
 }
 public void begin()
 {
     this.splatmapCopy = LandscapeSplatmapCopyPool.claim();
     for (int i = 0; i < Landscape.SPLATMAP_RESOLUTION; i++)
     {
         for (int j = 0; j < Landscape.SPLATMAP_RESOLUTION; j++)
         {
             for (int k = 0; k < Landscape.SPLATMAP_LAYERS; k++)
             {
                 this.splatmapCopy[i, j, k] = this.tile.sourceSplatmap[i, j, k];
             }
         }
     }
 }
Ejemplo n.º 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()
 {
     LandscapeSplatmapCopyPool.release(this.splatmapCopy);
 }