Skip to content

Commit

Permalink
Runs swap_weapon on Update schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
mnmaita committed Dec 19, 2024
1 parent 93f1808 commit aecec13
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions game/src/game/player/player_weapon.rs
Original file line number Diff line number Diff line change
@@ -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);
}
}

Expand Down

0 comments on commit aecec13

Please sign in to comment.