diff --git a/Assets/Assets_Grenade+1.wav b/Assets/Assets_Grenade+1.wav new file mode 100644 index 0000000..93e4afe Binary files /dev/null and b/Assets/Assets_Grenade+1.wav differ diff --git a/Assets/Assets_Gun+Silencer.wav b/Assets/Assets_Gun+Silencer.wav new file mode 100644 index 0000000..143afac Binary files /dev/null and b/Assets/Assets_Gun+Silencer.wav differ diff --git a/main.py b/main.py index cf19df3..9588023 100644 --- a/main.py +++ b/main.py @@ -14,8 +14,8 @@ BORDER = pygame.Rect(WIDTH//2 - 5, 0, 10, HEIGHT) -#BULLET_HIT_SOUND = pygame.mixer.Sound('Assets/Grenade+1.mp3') -#BULLET_FIRE_SOUND = pygame.mixer.Sound('Assets/Gun+Silencer.mp3') +BULLET_HIT_SOUND = pygame.mixer.Sound('Assets/Grenade+1.wav') # Using the wav formatted audio file +BULLET_FIRE_SOUND = pygame.mixer.Sound('Assets/Gun+Silencer.wav') # Using the wav formatted audio file HEALTH_FONT = pygame.font.SysFont('comicsans', 40) WINNER_FONT = pygame.font.SysFont('comicsans', 100) @@ -138,21 +138,21 @@ def main(): bullet = pygame.Rect( yellow.x + yellow.width, yellow.y + yellow.height//2 - 2, 10, 5) yellow_bullets.append(bullet) - #BULLET_FIRE_SOUND.play() + BULLET_FIRE_SOUND.play() if event.key == pygame.K_RCTRL and len(red_bullets) < MAX_BULLETS: bullet = pygame.Rect( red.x, red.y + red.height//2 - 2, 10, 5) red_bullets.append(bullet) - #BULLET_FIRE_SOUND.play() + BULLET_FIRE_SOUND.play() if event.type == RED_HIT: red_health -= 1 - #BULLET_HIT_SOUND.play() + BULLET_HIT_SOUND.play() if event.type == YELLOW_HIT: yellow_health -= 1 - #BULLET_HIT_SOUND.play() + BULLET_HIT_SOUND.play() winner_text = "" if red_health <= 0: