From 6eff6d1d8779480c5fb56a9b7fa619209da45423 Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Mon, 18 Mar 2024 12:41:49 +0200 Subject: status -> no get_sprites, separate update --- src/sliceitoff/__main__.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/sliceitoff/__main__.py') diff --git a/src/sliceitoff/__main__.py b/src/sliceitoff/__main__.py index df4ba22..68fca86 100644 --- a/src/sliceitoff/__main__.py +++ b/src/sliceitoff/__main__.py @@ -30,18 +30,24 @@ def sliceitoff(): game = Game(player = player) clock = pygame.time.Clock() - - for _ in range(6000): - if game.step(): - break + + + while True: + + dt = clock.tick(60) + for fun in (status, status): + fun.update(dt) + display.update( [ - status.get_sprites(), + status.sprites, field.get_sprites(), enemies.get_sprites(), player.get_sprites() ]) - clock.tick(60) + + if game.step(): + break sleep(2) pygame.quit() -- cgit v1.2.3