public void CreateMapWithGrid(int [,] grid) { this.Clear(); _tileAtlas = new TileTextureAtlas(this.Atlas, this.TileTextureSize, this.TileTextureSize); this.Width = grid.GetLength(0); this.Height = grid.GetLength(1); switch (this.Method) { default: case TilingMethod.CPU: createMapUsingMesh(grid); break; case TilingMethod.GPU: createMapUsingTexture(grid); break; } if (this.ClearAtlasCacheAfterCreate) _tileAtlas.ClearCachedTextureData(); }
public void CreateMapWithGrid(int [,] grid) { this.Clear(); _tileAtlas = new TileTextureAtlas(this.Atlas, this.TileTextureSize, this.TileTextureSize); this.Width = grid.GetLength(0); this.Height = grid.GetLength(1); switch (this.Method) { default: case TilingMethod.CPU: createMapUsingMesh(grid); break; case TilingMethod.GPU: createMapUsingTexture(grid); break; } if (this.ClearAtlasCacheAfterCreate) { _tileAtlas.ClearCachedTextureData(); } }