Fix death sound effect

This commit is contained in:
csd4ni3l
2025-06-10 13:13:03 +02:00
parent a50efc5cd1
commit 34a09d758e
4 changed files with 4 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ from ursina.prefabs.first_person_controller import FirstPersonController
from ursina import *
from utils.constants import weapons, max_enemy_speed
from ursina.shaders import lit_with_shadows_shader
from utils.preload import death_sound
import json
class Player(FirstPersonController):
@@ -77,6 +78,8 @@ class Player(FirstPersonController):
destroy(mouse.hovered_entity.path_line)
destroy(mouse.hovered_entity)
death_sound.play()
self.summon_enemy()
self.accuracy = (self.shots_hit / self.shots_fired) * 100