/// <summary> /// Sets the type of tile for the chunk at the given position, in the given map. /// </summary> /// <param name="position"></param> /// <param name="mapType"></param> /// <param name="type"></param> public void SetChunkTileType(Vector3Int position, Chunk.TilemapType mapType, Chunk.TileType type) { Chunk chunk = GetChunk(position); if (chunk != null) { chunk.SetChunkTileType(position, mapType, type); } }
/// <summary> /// Returns the tile stored in the chunk at the given position, in the given map. /// </summary> /// <param name="position"></param> /// <param name="mapType"></param> /// <returns></returns> public TileBase GetChunkTile(Vector3Int position, Chunk.TilemapType mapType) { Chunk chunk = GetChunk(position); if (chunk != null) { return(chunk.GetChunkTile(position, mapType)); } return(null); }
/// <summary> /// Returns the type of tile stored in the chunk at the given position, in the given map. /// </summary> /// <param name="position"></param> /// <param name="mapType"></param> /// <returns></returns> public Chunk.TileType GetChunkTileType(Vector3Int position, Chunk.TilemapType mapType) { Chunk chunk = GetChunk(position); if (chunk != null) { return(chunk.GetChunkTileType(position, mapType)); } return(Chunk.TileType.AIR); }