add sand texture to map
This commit is contained in:
parent
2f605c2919
commit
cceb1d50c6
BIN
data/images/terrain/sand.png
Normal file
BIN
data/images/terrain/sand.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 145 KiB |
@ -1,20 +1,20 @@
|
|||||||
xxxxxxxxxxxxxxxxxxxx
|
xxxxxxxxxxxxxxxxxxxx
|
||||||
xwwww..w...w...ww..x
|
xssssssssssssssssssx
|
||||||
xw......w.w...w..w.x
|
xs................sx
|
||||||
xwwww,,,,w,,,,wwww,x
|
xs................sx
|
||||||
xw......w.w...w..w.x
|
xs................sx
|
||||||
xwwww..w...w..w..w.x
|
xs................sx
|
||||||
x..................x
|
xs.....wwwwww.....sx
|
||||||
xw...w...ww...w..wwx
|
xs.....w,,,,w.....sx
|
||||||
xww.ww..w..w..w..w.x
|
xs.....w,,,,w.....sx
|
||||||
xw,w,w,,wwww,,w,,wwx
|
xs.....ww,,ww.....sx
|
||||||
xw...w..w.....w..w.x
|
xs................sx
|
||||||
xw...w..w.....ww.wwx
|
xs................sx
|
||||||
x..................x
|
xs................sx
|
||||||
x.w...w...ww...ww..x
|
xs................sx
|
||||||
x.ww.ww..w..w.w..w.x
|
xs................sx
|
||||||
x,w,w,w,,wwww,wwww,x
|
xs................sx
|
||||||
x.w...w..w..w.w....x
|
xs................sx
|
||||||
x.w...w..w..w.w....x
|
xs................sx
|
||||||
x..................x
|
xssssssssssssssssssx
|
||||||
xxxxxxxxxxxxxxxxxxxx
|
xxxxxxxxxxxxxxxxxxxx
|
@ -25,10 +25,8 @@ class Map:
|
|||||||
def terrainDraw(self):
|
def terrainDraw(self):
|
||||||
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 == 'w':
|
if tile == 's':
|
||||||
object = TerrainTile(col, row, 'wall.png', self.tileSize)
|
self.screen.draw(TerrainTile(col, row, 'sand.png', self.tileSize), Locations.MAP, 0, 0)
|
||||||
self.screen.draw(object, Locations.MAP, 0, 0)
|
|
||||||
self.collidables.add(object)
|
|
||||||
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), Locations.MAP, 0, 0)
|
||||||
elif tile == '.':
|
elif tile == '.':
|
||||||
@ -37,6 +35,10 @@ class Map:
|
|||||||
object = TerrainTile(col, row, 'water.jpg', self.tileSize)
|
object = TerrainTile(col, row, 'water.jpg', self.tileSize)
|
||||||
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':
|
||||||
|
object = TerrainTile(col, row, 'wall.png', 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)
|
||||||
|
Loading…
Reference in New Issue
Block a user