Fix match state remaining mutable after and of match and implement initial work on aerials (#77)
Reviewed-on: #77 Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #77.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use crate::fighter::state::jump::{JumpState, JumpType};
|
||||
use crate::fighter::state::land::{LandingState, LandingType};
|
||||
use crate::fighter::state::{CollisionContext, FighterState};
|
||||
use crate::fighter::state::{CollisionContext, FighterState, InterruptContext, air_attack, air_dodge};
|
||||
use crate::fighter::*;
|
||||
use crate::input::FighterCommands;
|
||||
|
||||
@@ -112,6 +113,17 @@ pub fn update_standard_motion(
|
||||
);
|
||||
}
|
||||
|
||||
pub fn air_interrupts_common(ctx: &mut InterruptContext, airborne_state_common: &AirborneStateCommon) -> Option<FighterState> {
|
||||
if ctx.input.has_command(FighterCommands::Jump) {
|
||||
Some(FighterState::Jump(JumpState {
|
||||
jump_type: JumpType::DoubleJump,
|
||||
airborne_state_common: AirborneStateCommon::default(),
|
||||
}))
|
||||
} else {
|
||||
air_dodge::check_input(ctx).or_else(|| air_attack::check_interrupt(ctx, airborne_state_common))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn collision_interrupt(
|
||||
ctx: &mut CollisionContext,
|
||||
landing_type: LandingType,
|
||||
|
||||
Reference in New Issue
Block a user