refactor: Changed BpmTimer into Resource

This commit is contained in:
Alexey 2026-04-20 15:14:40 +03:00
commit f3b2d0313e
5 changed files with 11 additions and 30 deletions

View file

@ -23,6 +23,7 @@ impl Plugin for GamePlugin {
StateMachinePlugin::default(),
))
.insert_resource(BpmTimer::new(120.))
.add_systems(Startup, (
setup,
setup_animated_sprite,
@ -31,7 +32,7 @@ impl Plugin for GamePlugin {
anim::sprite::update_animated_sprites,
combat::attack::update_attack_areas,
player::systems::handle_input,
timer::update_bpm_timers,
timer::update_bpm_timer,
))
.register_component_as::<dyn Weapon, knife::Knife>();
}