Пример #1
0
        public void OnNext(RawPngRasterTile tile)
        {
            if (tile.CurrentState == Tile.State.Loaded && !tile.HasError)
            {
                _elevationTexture = new Texture2D(2, 2);
                _elevationTexture.LoadImage(tile.Data);
                TextureScale.Point(_elevationTexture, _tileWidthInVoxels, _tileWidthInVoxels);

                if (ShouldBuildWorld())
                {
                    BuildVoxelWorld();
                }
            }
        }
Пример #2
0
        public void OnNext(RasterTile tile)
        {
            if (tile.CurrentState == Tile.State.Loaded && tile.Error == null)
            {
                _rasterTexture = new Texture2D(2, 2);
                _rasterTexture.LoadImage(tile.Data);
                TextureScale.Point(_rasterTexture, _tileWidthInVoxels, _tileWidthInVoxels);

                if (ShouldBuildWorld())
                {
                    BuildVoxelWorld();
                }
            }
        }