Merge remote-tracking branch 'origin/MapNew' into MapNew
This commit is contained in:
commit
242635038a
BIN
data/images/entities/rabbit.png
Normal file
BIN
data/images/entities/rabbit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 630 B |
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
|
||||
xwwww..w...w...ww..x
|
||||
xw......w.w...w..w.x
|
||||
xwwww,,,,w,,,,wwww,x
|
||||
xw......w.w...w..w.x
|
||||
xwwww..w...w..w..w.x
|
||||
x..................x
|
||||
xw...w...ww...w..wwx
|
||||
xww.ww..w..w..w..w.x
|
||||
xw,w,w,,wwww,,w,,wwx
|
||||
xw...w..w.....w..w.x
|
||||
xw...w..w.....ww.wwx
|
||||
x..................x
|
||||
x.w...w...ww...ww..x
|
||||
x.ww.ww..w..w.w..w.x
|
||||
x,w,w,w,,wwww,wwww,x
|
||||
x.w...w..w..w.w....x
|
||||
x.w...w..w..w.w....x
|
||||
x..................x
|
||||
xssssssssssssssssssx
|
||||
xs................sx
|
||||
xs................sx
|
||||
xs................sx
|
||||
xs................sx
|
||||
xs.....wwwwww.....sx
|
||||
xs.....w,,,,w.....sx
|
||||
xs.....w,,,,w.....sx
|
||||
xs.....ww,,ww.....sx
|
||||
xs................sx
|
||||
xs................sx
|
||||
xs................sx
|
||||
xs................sx
|
||||
xs................sx
|
||||
xs................sx
|
||||
xs................sx
|
||||
xs................sx
|
||||
xssssssssssssssssssx
|
||||
xxxxxxxxxxxxxxxxxxxx
|
@ -25,10 +25,8 @@ class Map:
|
||||
def terrainDraw(self):
|
||||
for row, tiles in enumerate(self.terrain):
|
||||
for col, tile in enumerate(tiles):
|
||||
if tile == 'w':
|
||||
object = TerrainTile(col, row, 'wall.png', self.tileSize)
|
||||
self.screen.draw(object, Locations.MAP, 0, 0)
|
||||
self.collidables.add(object)
|
||||
if tile == 's':
|
||||
self.screen.draw(TerrainTile(col, row, 'sand.png', self.tileSize), Locations.MAP, 0, 0)
|
||||
elif tile == ',':
|
||||
self.screen.draw(TerrainTile(col, row, 'floor.png', self.tileSize), Locations.MAP, 0, 0)
|
||||
elif tile == '.':
|
||||
@ -37,6 +35,10 @@ class Map:
|
||||
object = TerrainTile(col, row, 'water.jpg', self.tileSize)
|
||||
self.screen.draw(object, Locations.MAP, 0, 0)
|
||||
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):
|
||||
self.screen.draw(entity, Locations.MAP, 0, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user