Implement hitstun and knockback.

This commit is contained in:
2026-09-13 23:01:25 +02:00
parent 811578af2f
commit 4570860d64
26 changed files with 840 additions and 246 deletions
+15 -4
View File
@@ -2,10 +2,18 @@ use bevy::prelude::*;
use crate::{
fighter::{
animation::AnimKind, collision, state::{
FighterState, FighterStateContext, FighterStateImpl, air, air_dodge::{self, AirDodgeState}, fall::FallState, ground::{self, GroundedMotionResult, GroundedStateCommon}, land::{LandingState, LandingType},
animation::AnimKind,
collision,
state::{
FighterState, FighterStateContext, FighterStateImpl, air,
air_dodge::{self, AirDodgeState},
fall::FallState,
ground::{self, GroundedMotionResult, GroundedStateCommon},
land::{LandingState, LandingType},
},
}, input::FighterCommands, math::{int::FGi32, vec::FGVec2},
},
input::FighterCommands,
math::{int::FGi32, vec::FGVec2},
};
#[derive(Debug, Hash, Clone, Copy)]
pub enum JumpType {
@@ -231,7 +239,10 @@ impl FighterStateImpl for JumpState {
let grounded_common = GroundedStateCommon {
current_line_id: res.line_id,
};
Some(FighterState::Land(LandingState::create(grounded_common, LandingType::Normal)))
Some(FighterState::Land(LandingState::create(
grounded_common,
LandingType::Normal,
)))
} else {
None
}