Refactor loading

This commit is contained in:
2026-08-26 19:08:58 +02:00
parent 4ff388f9c0
commit 21a5170dbc
40 changed files with 1034 additions and 426 deletions
+4 -2
View File
@@ -100,7 +100,6 @@ pub fn postprocess_input(
game_settings: Res<GameSettings>,
) {
for (mut input, player) in query {
for command in FighterCommands::iter() {
input.reduce_command_lifetime(command);
}
@@ -128,7 +127,10 @@ pub fn postprocess_input(
}
if !input.prev_frame.jump && input.current_frame.jump {
input.set_lifetime(FighterCommands::Jump, game_settings.input_common.input_buffer_size);
input.set_lifetime(
FighterCommands::Jump,
game_settings.input_common.input_buffer_size,
);
}
if x_abs >= axis_threshold && input.frames_in_smash_move_deadzone <= frame_threshold {
+1 -1
View File
@@ -9,5 +9,5 @@ use crate::{input::InputActionState, math::vec::FGVec2};
pub struct FighterInputFrame {
pub movement: FGVec2,
pub directional_attack: FGVec2,
pub jump: bool
pub jump: bool,
}
+1 -3
View File
@@ -44,9 +44,7 @@ pub fn preprocess_keyboard_input(
InputMapAction::MovementYDir(sign) => {
input_frame.movement.y += (sign) * action_strength
}
InputMapAction::Jump => {
input_frame.jump = action_strength != FGi32::ZERO
},
InputMapAction::Jump => input_frame.jump = action_strength != FGi32::ZERO,
}
}