Solved gun firing on resume button click
This commit is contained in:
parent
adb9cdbe83
commit
866e8c5ff5
@ -91,6 +91,7 @@ pub fn capture_hand_usage(
|
||||
}
|
||||
// SHOOTING & RECOIL
|
||||
if mouse_buttons.pressed(MouseButton::Left) && !settings_screen_config.settings_menu_shown {
|
||||
//TODO: make click input not shoot when just clicked after a menu
|
||||
if player_firing_info.full_auto_timer.finished() {
|
||||
if magazine_data.rounds_shot < magazine_data.max_capacity {
|
||||
// Get recoil numbers from patterns
|
||||
|
@ -93,6 +93,7 @@ pub fn handle_settings_button_click(
|
||||
query: Query<(&Interaction, &SettingsScreenActions), Changed<Interaction>>,
|
||||
mut exit: EventWriter<AppExit>,
|
||||
mut settings: ResMut<SettingsScreenUIConfiguration>,
|
||||
mut mouse_buttons: ResMut<Input<MouseButton>>,
|
||||
) {
|
||||
for (interaction, action) in query.iter() {
|
||||
match interaction {
|
||||
@ -105,6 +106,7 @@ pub fn handle_settings_button_click(
|
||||
SettingsScreenActions::Resume => {
|
||||
// RESUME GAME
|
||||
settings.settings_menu_shown = false;
|
||||
mouse_buttons.release(MouseButton::Left);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user