Пример #1
0
 def __init__(self):
     Subpantalla.__init__(self)
     self.setFondo('imagen5.jpg')
     self.agregarTexto(
         texto.Linea('juego terminado', 'Airstrip Four.ttf',
                     (255, 255, 255), 40, (None, 200)))
     self.agregarTexto(
         texto.Linea('volve a intentarlo', 'Airstrip Four.ttf',
                     (255, 255, 255), 40, (None, 400)))
Пример #2
0
 def __init__(self, puntaje):
     Subpantalla.__init__(self)
     self.setFondo('imagen1.jpg')
     self.__puntaje = puntaje
     self.agregarTexto(
         texto.Linea('Ingrese su nombre y presione <Enter>',
                     'Airstrip Four.ttf', (255, 255, 255), 25, (None, 200)))
     self.agregarTexto(
         texto.Linea('', 'Airstrip Four.ttf', (255, 255, 255), 25,
                     (None, None)))
Пример #3
0
 def __cargarTexto(self):
     self.agregarTexto(
         texto.Linea('Nivel', 'Airstrip Four.ttf', (255, 255, 255), 18,
                     (5, 10)))
     self.agregarTexto(
         texto.Linea('Puntos', 'Airstrip Four.ttf', (255, 255, 255), 18,
                     (120, 10)))
     self.agregarTexto(
         texto.Linea('Tiempo', 'Airstrip Four.ttf', (255, 255, 255), 18,
                     (860, 10)))
     self.agregarTexto(
         texto.Linea('Unidades', 'Airstrip Four.ttf', (255, 255, 255), 14,
                     (97, 677)))
     self.agregarTexto(
         texto.Linea('Decenas', 'Airstrip Four.ttf', (255, 255, 255), 14,
                     (452, 677)))
     self.agregarTexto(
         texto.Linea('Centenas', 'Airstrip Four.ttf', (255, 255, 255), 14,
                     (800, 677)))
     self.agregarTexto(
         texto.Linea('', 'Airstrip Four.ttf', (255, 255, 255), 25,
                     (75, 10)))  #NIVEL
     self.agregarTexto(
         texto.Linea('', 'Airstrip Four.ttf', (255, 255, 255), 25,
                     (220, 10)))  #PUNTOS
     self.agregarTexto(
         texto.Linea('', 'Airstrip Four.ttf', (255, 255, 255), 25,
                     (960, 10)))  #TIEMPO
Пример #4
0
 def __pausa(self):
     screen = pygame.display.get_surface()
     screen.blit(funciones.cargarImagen('FONDOS' + os.sep + 'imagen5.jpg'),
                 (0, 0))
     texto.Linea('juego pausado', 'Airstrip Four.ttf', (255, 255, 255), 40,
                 (None, 250)).imprimir(screen)
     texto.Linea('presione cualquier tecla para continuar',
                 'Airstrip Four.ttf', (255, 255, 255), 40,
                 (None, 400)).imprimir(screen)
     pygame.display.update()
     while pygame.event.poll().type != KEYDOWN:
         pass
Пример #5
0
 def __cargarTexto(self):
     self.agregarTexto(
         texto.Linea('POSICIONES', 'Circus.ttf', (200, 200, 200), 40,
                     (None, 50)))
     self.agregarTexto(
         texto.Linea('Nombre', 'Bubbleboy.ttf', (100, 100, 100), 20,
                     (160, 160)))
     self.agregarTexto(
         texto.Linea('Fecha', 'Bubbleboy.ttf', (100, 100, 100), 20,
                     (480, 160)))
     self.agregarTexto(
         texto.Linea('Puntos', 'Bubbleboy.ttf', (100, 100, 100), 20,
                     (730, 160)))
Пример #6
0
 def __cargarTexto(self):
     self.agregarTexto(
         texto.Linea('NUEVO JUEGO', 'Circus.ttf', (0, 0, 0), 25,
                     (500, 125)))
     self.agregarTexto(
         texto.Linea('REGLAS DE JUEGO', 'Circus.ttf', (0, 0, 0), 25,
                     (550, 165)))
     self.agregarTexto(
         texto.Linea('TABLA DE POSICIONES', 'Circus.ttf', (0, 0, 0), 25,
                     (600, 205)))
     self.agregarTexto(
         texto.Linea('CREDITOS', 'Circus.ttf', (0, 0, 0), 25, (650, 245)))
     self.agregarTexto(
         texto.Linea('SALIR', 'Circus.ttf', (0, 0, 0), 25, (700, 285)))
Пример #7
0
 def imprimirTabla(self):
     y = 200
     for i in tabla.TablaDePosiciones().imprimir():
         x = 150
         for j in range(len(i)):
             self.agregarTexto(
                 texto.Linea(i[j], 'SF Beaverton.ttf', (160, 160, 160), 20,
                             (x, y)))
             x += 300
         y += 80
Пример #8
0
 def __esperar(self, nivel):
     screen = pygame.display.get_surface()
     screen.blit(funciones.cargarImagen('FONDOS' + os.sep + 'imagen5.jpg'),
                 (0, 0))
     texto.Linea('Presione una tecla para comenzar el nivel ' + str(nivel),
                 'Airstrip Four.ttf', (255, 255, 255), 40,
                 (None, None)).imprimir(screen)
     pygame.display.update()
     pygame.display.update()
     while pygame.event.poll().type != KEYDOWN:
         pass
Пример #9
0
 def __cargarErrores(self):
     path = os.path.join('Textos' + os.sep + 'Datos' + os.sep +
                         'errores.txt')
     archivo = funciones.abrirArchivo(path)
     for error in archivo.readlines():
         miTexto = texto.Linea(error.rstrip(), 'Airstrip Four.ttf',
                               self.__seleccionarColor(), 20,
                               (random.randint(10, ANCHO - 100), 35),
                               'error')
         cuenta = miTexto.getObjFont().render(
             miTexto.getTexto(), 1, miTexto.getColor())  # LA PALABRA!
         miTexto.setRect(cuenta.get_rect())
         miTexto.getRect().top = miTexto.getPosicion()[0]
         miTexto.getRect().left = miTexto.getPosicion()[1]
         self.__getErrores().append(miTexto)
Пример #10
0
 def __agregarCuentas(self, niv):
     paths = ['unidades.txt', 'decenas.txt', 'centenas.txt']
     for i in range(3):
         path = os.path.join('Textos' + os.sep + 'Datos' + os.sep +
                             paths[i])
         a = funciones.abrirArchivo(path)
         for miCuenta in a.readlines():
             miTexto = texto.Linea(miCuenta.rstrip(), 'Airstrip Four.ttf',
                                   (255, 255, 255), 20,
                                   (random.randint(10, ANCHO - 100), 35),
                                   self.__contenedores[i].getID())
             if (niv >= 2):
                 miTexto.setColor(self.__seleccionarColor())
             cuenta = miTexto.getObjFont().render(
                 miTexto.getTexto(), 1, miTexto.getColor())  # LA PALABRA!
             miTexto.setRect(cuenta.get_rect())
             miTexto.getRect().top = miTexto.getPosicion()[0]
             miTexto.getRect().left = miTexto.getPosicion()[1]
             self.__contenedores[i].agregarCuenta(miTexto)
         if (niv == 3):
             self.__cargarErrores()
Пример #11
0
 def __cargarTexto(self):
     self.agregarTexto(
         texto.Linea('CREDITOS', 'Circus.ttf', (200, 200, 200), 40,
                     (None, 50)))
Пример #12
0
 def __cargarTexto(self):
     self.agregarTexto(
         texto.Linea('REGLAS GENERALES', 'Circus.ttf', (200, 200, 200), 40,
                     (None, 50)))