diff options
author | Mateu Batle <mateu.batle@collabora.co.uk> | 2010-11-16 06:02:48 (GMT) |
---|---|---|
committer | Mateu Batle <mateu.batle@collabora.co.uk> | 2010-11-16 06:02:48 (GMT) |
commit | 499020b896af2e84041f943e9b5600735cb56660 (patch) | |
tree | 52e1fa9a85e762a7ea0d341b24348de0918e4d96 /game2 | |
parent | 2d34f7a7ec5bbaac74e855f7480d5b35f7456ec5 (diff) |
Fixed go to next state in game 2
Fixed reset score in game 2
Fixed stop music in game 2
Diffstat (limited to 'game2')
-rwxr-xr-x | game2/game2.py | 9 |
1 files changed, 7 insertions, 2 deletions
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): |