From aecec13c340d5a04c872b2cd7a5a491f655d7610 Mon Sep 17 00:00:00 2001 From: mnmaita <47983254+mnmaita@users.noreply.github.com> Date: Thu, 19 Dec 2024 15:11:53 +0100 Subject: [PATCH] Runs swap_weapon on Update schedule --- game/src/game/player/player_weapon.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/game/src/game/player/player_weapon.rs b/game/src/game/player/player_weapon.rs index f239b50..f5cc605 100644 --- a/game/src/game/player/player_weapon.rs +++ b/game/src/game/player/player_weapon.rs @@ -1,17 +1,16 @@ +use bevy::app::Update; use leafwing_input_manager::prelude::ActionState; use strum_macros::Display; use crate::game::player::{Player, PlayerAction}; -use crate::prelude::{ - App, GameTickUpdate, Plugin, Query, ResMut, Resource, With, -}; +use crate::prelude::{App, Plugin, Query, ResMut, Resource, With}; pub(crate) struct PlayerWeaponPlugin; impl Plugin for PlayerWeaponPlugin { fn build(&self, app: &mut App) { app.insert_resource(PlayerWeapon::default()); - app.add_systems(GameTickUpdate, swap_weapon); + app.add_systems(Update, swap_weapon); } }