Skip to content

Commit 34a09d7

Browse files
committed
Fix death sound effect
1 parent a50efc5 commit 34a09d7

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

assets/sound/death.mp3

-8.44 KB
Binary file not shown.

assets/sound/death.wav

84.8 KB
Binary file not shown.

game/player.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from ursina import *
44
from utils.constants import weapons, max_enemy_speed
55
from ursina.shaders import lit_with_shadows_shader
6+
from utils.preload import death_sound
67
import json
78

89
class Player(FirstPersonController):
@@ -77,6 +78,8 @@ def shoot(self):
7778
destroy(mouse.hovered_entity.path_line)
7879
destroy(mouse.hovered_entity)
7980

81+
death_sound.play()
82+
8083
self.summon_enemy()
8184

8285
self.accuracy = (self.shots_hit / self.shots_fired) * 100

utils/preload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from ursina import Audio
22

33
music_sound = Audio("assets/sound/music.mp3", autoplay=False)
4-
death_sound = Audio("assets/sound/death.mp3", autoplay=False)
4+
death_sound = Audio("assets/sound/death.wav", autoplay=False)

0 commit comments

Comments
 (0)