5aea98cd2f0d0f9863713d012475577a035e6707
[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, leveltop = None, levelbottom = None, objects=[]):
17 self.background = bgdata
18 # portals for level above, below, left or right of the character
19 self.levelleft = levelleft
20 self.levelright = levelright
21 self.leveltop = leveltop
22 self.levelbottom = levelbottom
23
24 # objects in the level as a list
25 self.objects = objects