add water texture to Map

This commit is contained in:
Wirus 2020-04-05 21:46:04 +02:00
parent 36fbdbab62
commit 55fb38aa0a
3 changed files with 24 additions and 20 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -1,20 +1,20 @@
.................... xxxxxxxxxxxxxxxxxxxx
..wwww..w...w...ww.. xwwww..w...w...ww..x
..w......w.w...w..w. xw......w.w...w..w.x
,,wwww,,,,w,,,,wwww, xwwww,,,,w,,,,wwww,x
..w......w.w...w..w. xw......w.w...w..w.x
..wwww..w...w..w..w. xwwww..w...w..w..w.x
.................... x..................x
.w...w...ww...w..ww. xw...w...ww...w..wwx
.ww.ww..w..w..w..w.. xww.ww..w..w..w..w.x
,w,w,w,,wwww,,w,,ww, xw,w,w,,wwww,,w,,wwx
.w...w..w.....w..w.. xw...w..w.....w..w.x
.w...w..w.....ww.ww. xw...w..w.....ww.wwx
.................... x..................x
..w...w...ww...ww... x.w...w...ww...ww..x
..ww.ww..w..w.w..w.. x.ww.ww..w..w.w..w.x
,,w,w,w,,wwww,wwww,, x,w,w,w,,wwww,wwww,x
..w...w..w..w.w..... x.w...w..w..w.w....x
..w...w..w..w.w..... x.w...w..w..w.w....x
.................... x..................x
.................... xxxxxxxxxxxxxxxxxxxx

View File

@ -33,6 +33,10 @@ class Map:
self.screen.draw(TerrainTile(col, row, 'floor.png', self.tileSize), Locations.MAP, 0, 0) self.screen.draw(TerrainTile(col, row, 'floor.png', self.tileSize), 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), Locations.MAP, 0, 0)
elif tile == 'x':
object = TerrainTile(col, row, 'water.jpg', self.tileSize)
self.screen.draw(object, Locations.MAP, 0, 0)
self.collidables.add(object)
def addEntity(self, entity): def addEntity(self, entity):
self.screen.draw(entity, Locations.MAP, 0, 0) self.screen.draw(entity, Locations.MAP, 0, 0)