de8d76fed3e40daeaf64c9d71309288d204bc39c
1 # level.py - level data and class
5 # Background level data
6 # A level is a list of list of tuples. Level is a 10x10 room of 48 pixel images
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)
14 # Class to represent levels
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
25 # objects in the level as a list
26 self
.objects
= objects
28 # npcs in the level as a list