hit sounds and general sound effects sys
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::{keys::KeySpawn, tb_entities::EnemySpawn};
|
||||
use crate::{keys::KeySpawn, sounds::PlaySound, tb_entities::EnemySpawn};
|
||||
use bevy::prelude::*;
|
||||
|
||||
#[derive(Event, Reflect)]
|
||||
@@ -30,6 +30,8 @@ fn on_hit(
|
||||
return;
|
||||
};
|
||||
|
||||
commands.trigger(PlaySound::Hit);
|
||||
|
||||
hp.0 = hp.0.saturating_sub(*damage as i32);
|
||||
|
||||
info!("npc hp changed: {} [{}]", hp.0, trigger.entity());
|
||||
|
||||
Reference in New Issue
Block a user