fix contact damage and test with impaler
This commit is contained in:
parent
9d397451c4
commit
5460785348
6 changed files with 15 additions and 12 deletions
|
|
@ -19,6 +19,7 @@ impl Plugin for CombatDamagersPlugin {
|
|||
}
|
||||
|
||||
#[derive(Component)]
|
||||
#[require(CollisionEventsEnabled)]
|
||||
pub struct ContactDamage {
|
||||
pub amount: f32,
|
||||
}
|
||||
|
|
@ -29,6 +30,7 @@ fn deal_contact_damage(
|
|||
mut commands: Commands,
|
||||
) {
|
||||
for event in reader.read() {
|
||||
info!("event recv!");
|
||||
if let Ok(contact) = query.get(event.0) {
|
||||
commands.trigger_targets(
|
||||
Attacked {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue