From 89d92f39cdfaed89d4a7693f4fef08829485edd0 Mon Sep 17 00:00:00 2001 From: Ivan-Roger Date: Thu, 4 Feb 2016 18:49:51 +0100 Subject: [PATCH] tentative de musique --- fin_jeu.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fin_jeu.py b/fin_jeu.py index 18540a5..75a1497 100644 --- a/fin_jeu.py +++ b/fin_jeu.py @@ -5,8 +5,6 @@ def __init__(self,screen): self.screen = screen self.font = pygame.font.Font("alagard.ttf",20) self.fontTitle = pygame.font.Font("alagard.ttf",50) - self.music_victoire = pygame.mixer.music.load('Musique/theme_principal.mp3') - self.music_defaite = pygame.mixer.music.load('Musique/defaite.mp3') self.background_image = pygame.image.load("images/back2.jpg") self.text_fonction = pygame.font.Font("alagard.ttf",200, bold=True) @@ -15,9 +13,18 @@ def __init__(self,screen): self.vict = False def start(self,victoire): + print('................') self.vict = victoire + if victoire: + print('victoire') + self.music_victoire = pygame.mixer.music.load('Musique/theme_principal.mp3') + else: + print('defaite') + self.music_defaite = pygame.mixer.music.load('Musique/defaite.mp3') + print('!!!!!!!!!!!') pygame.mixer.music.play() pygame.mixer.music.set_volume(1.0) + print('................') def stop(self): pygame.mixer.music.stop()