예제 #1
0
 pygame.mixer.music.stop()
 select=0
 while (select>2 or select<1):
     print "(1)Subir la ladera \n(2)Continuar recto"
     select=int(raw_input("Tu eleccion: "))
 if select==2:
     heroe.hp=heroe.hp-5
     pygame.mixer.music.load("C:\Python27\data\intro7.mp3")
     pygame.mixer.music.play()
     raw_input("Press enter to skip or to continue...")
     enemigo=Enemie()
     enemigo.defEnem(20, 15, 10, 12, 10)
     pygame.mixer.music.load("C:\Python27\data\intro8.mp3")
     pygame.mixer.music.play()
     time.sleep(4)
     heroe.pelea(enemigo)
     if heroe.hp<=0:
         pygame.mixer.music.load("C:\Python27\data\over.mp3")
         pygame.mixer.music.play()
         time.sleep(4)
         sys.exit()
     pygame.mixer.music.load("C:\Python27\data\gana1.mp3")
     pygame.mixer.music.play()
     raw_input("Press enter to skip or to continue...")
     pygame.mixer.music.stop()
     heroe.hp=heroe.hp+5
     pygame.mixer.music.load("C:\Python27\data\intro9.mp3")
     pygame.mixer.music.play()
     raw_input("Press enter to skip or to continue...")
     pygame.mixer.music.stop()