diff --git a/laser-shot-ingame-230500.mp3 b/laser-shot-ingame-230500.mp3 new file mode 100644 index 0000000..cb468b0 Binary files /dev/null and b/laser-shot-ingame-230500.mp3 differ diff --git a/main.py b/main.py index 04b32f6..8f3677d 100644 --- a/main.py +++ b/main.py @@ -33,6 +33,7 @@ def creer_ananas(pos_x, pos_y): ananas.rect.y = pos_y return ananas pygame.init() +bullet_sound = pygame.mixer.Sound('laser-shot-ingame-230500.mp3') clock = pygame.time.Clock() running = True avion = pygame.sprite.Sprite() @@ -103,6 +104,7 @@ while running: nouvel_bullet = creer_bullet(avion.rect.centerx, avion.rect.y) liste_d_bullets.append(nouvel_bullet) liste_sprites_bullets.add(nouvel_bullet) + pygame.mixer.Sound.play(bullet_sound) keys = pygame.key.get_pressed() if keys[pygame.K_SPACE]: liste_des_sprites.remove(texte)