From 1a61dae476a0232f1111ac36acbfc6c384794900 Mon Sep 17 00:00:00 2001 From: Mateu Batle Date: Mon, 15 Nov 2010 04:01:40 +0000 Subject: Added title mode to game 1 Fixed text at the end of game 1 and game 2 Fixed centering of text in game 2 --- (limited to 'game2') diff --git a/game2/game2.py b/game2/game2.py index 18fbc6b..f5d2403 100755 --- a/game2/game2.py +++ b/game2/game2.py @@ -148,13 +148,11 @@ class Game2(usmpgames.ApplicationState): def exiting_state(self, fromStack): global score self.next_state().clear_all() - self.next_state().add_htmltext( - _(""" Felicidades\n\nHas conseguido %d puntos""") % score, + self.next_state().add_text2( + _(""" Felicidades\n\nHas conseguido %d puntos""") % score, color = (0, 255, 0, 0), pos = (660, 260), - rectsize = (380, 390), - fontsize = 22, - font = "arial"); + rectsize = (380, 390) ); def loop(self, ms): global gameOverSound, correctAnswerSound, musicSound @@ -411,7 +409,7 @@ class Game2(usmpgames.ApplicationState): surface.blit(sad, rectBunny) #surface.blit(sad, rectBunny) score=returnScore() - drawText(_('RESPUESTA INCORRECTA!'), font, surface, (WINDOWWIDTH / 2.85), (WINDOWHEIGHT / 2.25), TEXTCOLOR) + drawText(_('RESPUESTA INCORRECTA!'), font, surface, (WINDOWWIDTH / 4), (WINDOWHEIGHT / 2.25), TEXTCOLOR) drawText(_('RESPUESTA CORRECTA: '+str(result)), font, surface, (WINDOWWIDTH / 3.8), (WINDOWHEIGHT / 2.25)+50, TEXTCOLOR) drawText(_('PULSA UNA TECLA'), font, surface, (WINDOWWIDTH / 3), (WINDOWHEIGHT / 2.25) + 100, TEXTCOLOR) @@ -439,7 +437,8 @@ class Game2(usmpgames.ApplicationState): ######################################## methods #Time Limit -TIMELIMIT=240.0 +#TIMELIMIT=240.0 +TIMELIMIT=30.0 #print ('time: '+str(TIMESTART)) def compareTime(playTime, gamestate): -- cgit v0.9.1