Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/game2/game2.py
diff options
context:
space:
mode:
Diffstat (limited to 'game2/game2.py')
-rwxr-xr-xgame2/game2.py9
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):