Moat has been added to level 1.

This commit is contained in:
Sakse Dalum
2012-08-09 13:54:27 +02:00
parent 1ebd4a9c91
commit 9456b30c8c
4 changed files with 133 additions and 47 deletions

View File

@@ -56,7 +56,7 @@ class Level(object):
if not self.paused:
for obj in self.objects:
obj.update(e, t, dt)
if self.player.is_moving and hasattr(obj, 'update_alpha'):
if self.player.is_moving:
obj.update_alpha()
@@ -65,7 +65,7 @@ class Level(object):
self.camera_y = (self.player.y - screen_size[1] / 2 - 24)
def draw(self, window):
window.blit(self.background, (0 - self.camera_x, -48 - self.camera_y))
window.blit(self.background, (0 - self.camera_x, 0 - self.camera_y))
for obj in sorted(self.objects, key=lambda obj: (obj.y + obj.z)):
obj.draw(window)