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