Minor fixes.

This commit is contained in:
Niels Serup 2012-08-14 00:59:06 +02:00
parent b6700125c4
commit 40a7841b34
3 changed files with 10 additions and 1 deletions

View File

@ -23,7 +23,8 @@ class Level2(level.Level):
for i in range(self.dimensions[0]): for i in range(self.dimensions[0]):
for j in range(self.dimensions[1]): for j in range(self.dimensions[1]):
self.tiles.append( self.tiles.append(
tile.Tile(self, i*64, (j + 1)*48, self.imgs['indoor%d' % random.randint(1, 6)])) tile.Tile(self, i*64, (j + 1)*48,
self.imgs['indoor%d' % random.randint(1, 6)]))
self.draw_background() self.draw_background()
@ -44,6 +45,9 @@ class Level2(level.Level):
toggling=False, toggling=False,
anim='lever_updown')) anim='lever_updown'))
self.player.set_pos(64 * 2, 48 * 1)
self.player.set_init_pos()
def restart(self): def restart(self):
for obj in self.objects: for obj in self.objects:

View File

@ -109,6 +109,8 @@ class Level3(level.Level):
for b in action_blocks: for b in action_blocks:
b.action = update_wells b.action = update_wells
self.player.set_pos(64 * 4, 48 * 3)
self.player.set_init_pos()
def restart(self): def restart(self):
for obj in self.objects: for obj in self.objects:

View File

@ -73,6 +73,9 @@ class Level(level.Level):
toggling=False, toggling=False,
anim='lever_updown')) anim='lever_updown'))
self.player.set_pos(64 * 1, 48 * 2)
self.player.set_init_pos()
def enter(self, root_level): def enter(self, root_level):
self.__dict__.update(locals()) self.__dict__.update(locals())
self.game.objs.remove(root_level) self.game.objs.remove(root_level)