summaryrefslogtreecommitdiff
path: root/src/sliceitoff/game/level.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sliceitoff/game/level.py')
-rw-r--r--src/sliceitoff/game/level.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/sliceitoff/game/level.py b/src/sliceitoff/game/level.py
index 26df345..0742213 100644
--- a/src/sliceitoff/game/level.py
+++ b/src/sliceitoff/game/level.py
@@ -20,7 +20,6 @@ class Level:
self.field = Field(stats = self.stats)
self.enemies = Enemies(count = self.stats.enemies)
self.player = Player()
- self.player_single = pygame.sprite.Group()
self.level_info = Show(level_screen(stats.level))
self.ended = False
@@ -28,7 +27,6 @@ class Level:
self.gameplay = Gameplay(
player = self.player,
- status = self.status,
field = self.field,
enemies = self.enemies,
stats = self.stats)
@@ -36,7 +34,8 @@ class Level:
self.status,
self.field,
self.enemies,
- self.level_info]
+ self.level_info,
+ self.player]
def step(self, dt):
self.status.update(dt = dt)
@@ -53,11 +52,8 @@ class Level:
return False
else:
- self.player_single = pygame.sprite.GroupSingle(
- sprite = self.player.get_top_sprite())
self.stats.update_bonus(dt)
if self.gameplay.step():
- self.player_single = pygame.sprite.Group()
self.ended = True
if self.stats.lives:
self.endscreen = Show(levelup_screen(self.stats))
@@ -65,6 +61,6 @@ class Level:
self.endscreen = Show(gameover_screen())
self.obj_classes.append(self.endscreen)
- self.display.update(self.obj_classes+[self.player_single])
+ self.display.update(self.obj_classes)
return True