Started work on NPC dialogues
[butaba-adventures.git] / level.py
1 # level.py - level data and class
2
3 import object
4
5 # Background level data
6 # A level is a list of list of tuples. Level is a 10x10 room of 48 pixel images
7 #
8 # every tuple represents a single background tile
9 # first item is tile row in the tileset
10 # second item is tile col in the tilest
11 # third item defines whether solid or not (0 or 1)
12
13
14 # Class to represent levels
15 class Level:
16 def __init__ (self, bgdata, levelleft=None, levelright=None,
17 leveltop = None, levelbottom = None, objects=[], npcs=[]):
18 self.background = bgdata
19 # portals for level above, below, left or right of the character
20 self.levelleft = levelleft
21 self.levelright = levelright
22 self.leveltop = leveltop
23 self.levelbottom = levelbottom
24
25 # objects in the level as a list
26 self.objects = objects
27
28 # npcs in the level as a list
29 self.npcs = npcs