Skip to content

Commit

Permalink
tentative de musique
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan-Roger committed Feb 4, 2016
1 parent 05a7d82 commit 89d92f3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions fin_jeu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down

0 comments on commit 89d92f3

Please sign in to comment.