Changed Tiles to take into account the texturepack

This commit is contained in:
eichhornchen 2020-11-06 17:04:42 +01:00
parent 4a54609bad
commit a6b93cacfb
1 changed files with 10 additions and 4 deletions

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python
from enum import Enum
from dungeonbattle.settings import Settings
import dungeonbattle.texturepack as tp
class Map:
"""
@ -53,9 +54,14 @@ class Map:
class Tile(Enum):
EMPTY = ' '
WALL = ''
FLOOR = '.'
if self.settings.TEXTURE_PACK == 'ASCII'
self.textures = tp.ascii_textures
if self.settings.TEXTURE_PACK == 'SQUIRREL'
self.textures = tp.squirrel_textures
EMPTY = self.textures["EMPTY"]
WALL = self.textures["WALL"]
FLOOR = self.textures["FLOOR"]
def is_wall(self) -> bool:
return self == Tile.WALL