From 499020b896af2e84041f943e9b5600735cb56660 Mon Sep 17 00:00:00 2001 From: Mateu Batle Date: Tue, 16 Nov 2010 06:02:48 +0000 Subject: Fixed go to next state in game 2 Fixed reset score in game 2 Fixed stop music in game 2 --- (limited to 'game2') diff --git a/game2/game2.py b/game2/game2.py index 180df8f..e575b5e 100755 --- a/game2/game2.py +++ b/game2/game2.py @@ -142,8 +142,9 @@ class Game2(usmpgames.ApplicationState): #Get initial time global TIMESTART TIMESTART= round(time.time(),0) - global score + global score, a score = 0 + a = 0 def exiting_state(self, fromStack): global score @@ -153,6 +154,9 @@ class Game2(usmpgames.ApplicationState): color = (0, 255, 0, 0), pos = (660, 260), rectsize = (380, 390) ); + global musicSound + musicSound.stop() + usmpgames.ApplicationState.exiting_state(self, fromStack) def loop(self, ms): global gameOverSound, correctAnswerSound, musicSound @@ -447,7 +451,8 @@ def compareTime(playTime, gamestate): #print('c time: '+str(c)) if(c>TIMELIMIT): #print ('Time Limit!') - gamestate.set_running( False ) + #gamestate.set_running( False ) + gamestate.go_to_next_state() #Loading Image Method def load_image(fileName): -- cgit v0.9.1