Implement tap jump and clean some fluff (#83)
CI / build-and-test (push) Successful in 1m33s
CI / production-build (push) Successful in 11m45s

Reviewed-on: #83
Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #83.
This commit is contained in:
2026-10-05 15:01:31 +00:00
committed by EIREXE
parent d2d649b059
commit 5c277a00f0
5 changed files with 67 additions and 47 deletions
+7 -1
View File
@@ -22,6 +22,7 @@ pub enum FighterCommands {
SmashMoveDown,
SmashMoveLeft,
SmashMoveRight,
TapJump,
}
pub(crate) fn second_binding_pressed(
@@ -32,7 +33,7 @@ pub(crate) fn second_binding_pressed(
}
impl FighterCommands {
pub const COUNT: usize = 8;
pub const COUNT: usize = 9;
pub const fn index(self) -> usize {
match self {
@@ -44,6 +45,7 @@ impl FighterCommands {
Self::SmashMoveDown => 5,
Self::SmashMoveLeft => 6,
Self::SmashMoveRight => 7,
Self::TapJump => 8,
}
}
}
@@ -514,6 +516,10 @@ pub fn postprocess_input(
y_flick_detected = !x_flick_detected;
}
if y_flick_detected && input.current_frame.movement.y > 0.0 {
input.set_lifetime(FighterCommands::TapJump, tap);
}
if attack_pressed {
let attack_type = if y_flick_detected {
if input.current_frame.movement.y > 0.0 {