From dd49ec5b5c977125779b2dfb11260fef425a81b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Sat, 30 Aug 2014 22:13:53 +0200 Subject: [PATCH 1/2] Allow to quit again, keep the score after the game is over. --- game.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/game.py b/game.py index 5470c36..476cd48 100755 --- a/game.py +++ b/game.py @@ -68,12 +68,16 @@ def main(): timeleft -= time_passed / 1000 timeleft = round(timeleft, 2) - if timeleft <= 0: screen_width, screen_height = size screen.blit(game_over, (screen_width/3, screen_height/2)) displaytime = 'Timed out!' + # Redraw the HUD + the_hud.draw_hud(score, displaytime, round(fps, 2)) pygame.display.flip() + for event in pygame.event.get(): + if event.type == pygame.QUIT: + running = False continue else: displaytime = timeleft From 36983ea6f9a01d2f44a93ec3ef113181f04b11b7 Mon Sep 17 00:00:00 2001 From: Steve Clement Date: Sat, 30 Aug 2014 22:15:52 +0200 Subject: [PATCH 2/2] - pin mouse follow place holder --- game.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/game.py b/game.py index b82b9b0..a802b93 100755 --- a/game.py +++ b/game.py @@ -117,6 +117,9 @@ def main(): score += 100 elif hit == False: score -= 50 + if event.type == MOUSEMOTION: + # implement pin who follows mouse here + pass # Had enough of this? if event.type == pygame.QUIT: