describe sprites costs

This commit is contained in:
Mateusz 2020-04-25 23:34:49 +02:00
parent 91efd32d87
commit d44274397d

View File

@ -75,17 +75,19 @@ class Map:
for row, tiles in enumerate(self.terrain): for row, tiles in enumerate(self.terrain):
for col, tile in enumerate(tiles): for col, tile in enumerate(tiles):
if tile == 's': if tile == 's':
self.screen.draw(TerrainTile(col, row, 'sand.png', self.tileSize), Locations.MAP, 0, 0) self.screen.draw(TerrainTile(col, row, 'sand.png', self.tileSize, 15), Locations.MAP, 0, 0)
elif tile == ',': elif tile == ',':
self.screen.draw(TerrainTile(col, row, 'floor.png', self.tileSize), Locations.MAP, 0, 0) self.screen.draw(TerrainTile(col, row, 'floor.png', self.tileSize, 0), Locations.MAP, 0, 0)
elif tile == '.': elif tile == '.':
self.screen.draw(TerrainTile(col, row, 'grass.png', self.tileSize), Locations.MAP, 0, 0) self.screen.draw(TerrainTile(col, row, 'grass.png', self.tileSize, 10), Locations.MAP, 0, 0)
elif tile == 'c':
self.screen.draw(TerrainTile(col, row, 'clay.png', self.tileSize, 20), Locations.MAP, 0, 0)
elif tile == 'x': elif tile == 'x':
object = TerrainTile(col, row, 'water.png', self.tileSize) object = TerrainTile(col, row, 'water.png', self.tileSize, 0)
self.screen.draw(object, Locations.MAP, 0, 0) self.screen.draw(object, Locations.MAP, 0, 0)
self.collidables.add(object) self.collidables.add(object)
elif tile == 'w': elif tile == 'w':
object = TerrainTile(col, row, 'wall.png', self.tileSize) object = TerrainTile(col, row, 'wall.png', self.tileSize, 0)
self.screen.draw(object, Locations.MAP, 0, 0) self.screen.draw(object, Locations.MAP, 0, 0)
self.collidables.add(object) self.collidables.add(object)