Skip to content
Snippets Groups Projects
Commit 0b032581 authored by Jantz's avatar Jantz
Browse files

Added turret placement sound

parent d88fd747
No related branches found
No related tags found
No related merge requests found
File added
......@@ -7,6 +7,7 @@ bullet_sound = pg.mixer.Sound('assets/sounds/bullet.mp3')
zombie_groan_1 = pg.mixer.Sound('assets/sounds/zombie_groan_1.mp3')
zombie_groan_2 = pg.mixer.Sound('assets/sounds/zombie_groan_2.mp3')
round_win = pg.mixer.Sound('assets/sounds/round_win.mp3')
turret_placement = pg.mixer.Sound('assets/sounds/turret_placement.mp3')
# Set the volume of the sounds
......@@ -15,6 +16,7 @@ bullet_sound.set_volume(0.2)
zombie_groan_1.set_volume(0.2)
zombie_groan_2.set_volume(0.2)
round_win.set_volume(0.6)
turret_placement.set_volume(0.6)
def play_zombie_groan():
"""Plays a random zombie groan sound."""
......
......@@ -78,6 +78,7 @@ class World:
collision = any(temp_turret.rect.colliderect(sprite.rect) for sprite in self.turret_group)
if not collision:
self.turret_group.append(temp_turret)
sound.turret_placement.play()
self.money -= temp_turret.cost
def turret_attacks(self, dt: float):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment