package pathgame.rendering;

import pathgame.tilemap.Tile;
import pathgame.tilemap.TileMap;

/** A static {@link  pathgame.rendering.TileTextureProvider TileTextureProvider},
 * which always returns the same {@link  pathgame.rendering.TileTexture TileTexture}.
 *
 * @author kajetan
 */
public class StaticTextureProvider implements TileTextureProvider
{
    private final TileTexture tt;
    
    /** Creates a new static texture provider.
     *
     * @param tt a tile texture
     */
    public StaticTextureProvider(TileTexture tt)
    {
        this.tt = tt;
    }
    
    @Override
    public TileTexture getTexture(TileMap map, Tile t, int x, int y)
    {
        return tt;
    }
}
