Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/FGR_T0102.py
diff options
context:
space:
mode:
Diffstat (limited to 'FGR_T0102.py')
-rw-r--r--FGR_T0102.py19
1 files changed, 7 insertions, 12 deletions
diff --git a/FGR_T0102.py b/FGR_T0102.py
index 2be82b7..f00fbb7 100644
--- a/FGR_T0102.py
+++ b/FGR_T0102.py
@@ -28,11 +28,9 @@ class FGR_T0102(gtk.Widget):
self.ventana = None
self.nombre = "Tipos de seƱales"
self.estado = False
- # Variables del Juego
self.fondo = None
self.reloj = None
self.puntos = 0
-
# Sprites
self.textos = None
self.botonesmenu = None
@@ -40,12 +38,10 @@ class FGR_T0102(gtk.Widget):
self.seniales = None
self.carteles = None
self.senial_select = None
-
# sonidos
self.sonido_error = None
self.sonido_exito = None
self.sound_select = None
-
# Escalado
self.ventana_real = None
self.resolucionreal = None
@@ -105,15 +101,13 @@ class FGR_T0102(gtk.Widget):
self.seniales.update()
self.carteles.update()
self.controles.update()
- self.handle_event_Game()
+ #self.handle_event_Game()
pygame.event.clear()
self.carteles.draw(self.ventana)
self.seniales.draw(self.ventana)
self.controles.draw(self.ventana)
self.ventana_real.blit(pygame.transform.scale(self.ventana, self.resolucionreal), (0,0))
pygame.display.update()
- #self.victory()
- #self.game_over(None)
def reset(self):
self.puntos= 0
@@ -134,12 +128,10 @@ class FGR_T0102(gtk.Widget):
self.sonido_exito.play()
self.senial_select.ubicada= True
self.controles.recuadro_select.remove(self.controles)
-
random.seed()
posicion= random.choice(cartel.posiciones)
cartel.posiciones.remove(posicion)
self.senial_select.rect.x, self.senial_select.rect.y= posicion
-
self.senial_select= None
self.puntos+= 10
self.controles.actualiza_puntos()
@@ -223,8 +215,10 @@ class FGR_T0102(gtk.Widget):
# ----------- SETEOS -------------
def load(self):
- pygame.event.set_blocked([JOYAXISMOTION, JOYBALLMOTION, JOYHATMOTION, JOYBUTTONUP, JOYBUTTONDOWN, KEYUP, USEREVENT])
- pygame.event.set_allowed([MOUSEMOTION, MOUSEBUTTONUP, MOUSEBUTTONDOWN, KEYDOWN, VIDEORESIZE, VIDEOEXPOSE, QUIT, ACTIVEEVENT])
+ pygame.event.set_blocked([JOYAXISMOTION, JOYBALLMOTION, JOYHATMOTION,
+ JOYBUTTONUP, JOYBUTTONDOWN, KEYUP, USEREVENT])
+ pygame.event.set_allowed([MOUSEMOTION, MOUSEBUTTONUP, MOUSEBUTTONDOWN,
+ KEYDOWN, VIDEORESIZE, VIDEOEXPOSE, QUIT, ACTIVEEVENT])
pygame.mouse.set_visible(True)
A, B= G.RESOLUCION
self.ventana = pygame.Surface( (A, B), flags=HWSURFACE )
@@ -308,13 +302,14 @@ class FGR_T0102(gtk.Widget):
self.estado= "Intro"'''
# ----------- EVENTOS en MENU ---------------
+ '''
# ----------- EVENTOS en JUEGO ---------------
def handle_event_Game(self):
for event in pygame.event.get(pygame.KEYDOWN):
letra= pygame.key.nombre(event.key)
if letra== "escape":
pygame.event.clear()
- return self.run_dialog_game(None)
+ return self.run_dialog_game(None)'''
def run_dialog_game(self, button):
self.controles.stop()