Add drawable grid

This commit is contained in:
kleph 2017-11-11 00:10:19 +01:00
parent 7120d1507d
commit 9a9a2a56b2

View file

@ -93,8 +93,6 @@ class Room:
tilemap[self.x + x][self.y + self.height - 1] = Level.TILE_WALL tilemap[self.x + x][self.y + self.height - 1] = Level.TILE_WALL
def center(self): def center(self):
cx = 0
cy = 0
cx = round(self.x + self.width / 2) cx = round(self.x + self.width / 2)
cy = round(self.y + self.height / 2) cy = round(self.y + self.height / 2)
@ -118,6 +116,7 @@ class Level:
self.rooms = [] self.rooms = []
self.regenerate() self.regenerate()
self.seed = seed self.seed = seed
self.grid = 0
def load_tileset(self, tile_file): def load_tileset(self, tile_file):
resource_file = open(tile_file) resource_file = open(tile_file)