put projectile movement updates into fixedupdate

This commit is contained in:
2025-04-28 23:03:25 +02:00
parent c9f17e4130
commit b4bfa53df4
3 changed files with 15 additions and 11 deletions

View File

@@ -38,9 +38,10 @@ struct ShotAssets {
pub fn plugin(app: &mut App) {
app.add_systems(OnEnter(GameState::Playing), setup);
app.add_systems(Update, shot_collision.run_if(in_state(GameState::Playing)));
app.add_systems(
Update,
(shot_collision, update, timeout).run_if(in_state(GameState::Playing)),
FixedUpdate,
(update, timeout).run_if(in_state(GameState::Playing)),
);
global_observer!(app, on_trigger_missile);