support multiple thrown projectiles

This commit is contained in:
2025-04-08 10:51:46 +02:00
parent bf90ad8caf
commit ae8026588b
7 changed files with 50 additions and 30 deletions

View File

@@ -44,6 +44,7 @@ pub struct TriggerData {
rot: Quat,
pos: Vec3,
target_layer: GameLayer,
head: usize,
}
impl TriggerData {
@@ -53,6 +54,7 @@ impl TriggerData {
rot: Quat,
pos: Vec3,
target_layer: GameLayer,
head: usize,
) -> Self {
Self {
target,
@@ -60,6 +62,7 @@ impl TriggerData {
rot,
pos,
target_layer,
head,
}
}
}
@@ -135,6 +138,7 @@ fn on_trigger_state(
pos: transform.translation,
target: target.0,
target_layer: GameLayer::Npc,
head: state.head,
};
active_heads.use_ammo(time.elapsed_secs());