StaticTextureProvider.java 433 B

1234567891011121314151617
  1. package pathgame.rendering;
  2. import pathgame.tilemap.Tile;
  3. import pathgame.tilemap.TileMap;
  4. public class StaticTextureProvider implements TileTextureProvider {
  5. private final TileTexture tileTexture;
  6. public StaticTextureProvider(TileTexture tileTexture) {
  7. this.tileTexture = tileTexture;
  8. }
  9. @Override
  10. public TileTexture getTexture(TileMap map, Tile t, int x, int y) {
  11. return tileTexture;
  12. }
  13. }