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:
@@ -7,7 +7,7 @@ use crate::{
|
||||
CollisionContext, EnterContext, FighterState, FighterStateImpl, InterruptContext,
|
||||
UpdateContext,
|
||||
air::{self, AirborneStateCommon},
|
||||
air_dodge::{self, AirDodgeState},
|
||||
air_dodge::AirDodgeState,
|
||||
ground,
|
||||
},
|
||||
},
|
||||
@@ -23,8 +23,8 @@ pub enum JumpType {
|
||||
|
||||
#[derive(Debug, Clone, Hash)]
|
||||
pub struct JumpState {
|
||||
jump_type: JumpType,
|
||||
airborne_state_common: AirborneStateCommon,
|
||||
pub jump_type: JumpType,
|
||||
pub airborne_state_common: AirborneStateCommon,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Hash)]
|
||||
@@ -108,14 +108,7 @@ impl FighterStateImpl for JumpSquatState {
|
||||
impl FighterStateImpl for JumpState {
|
||||
const NAME: &'static str = "Jump";
|
||||
fn check_interrupt(&self, state_context: &mut InterruptContext) -> Option<FighterState> {
|
||||
if state_context.input.has_command(FighterCommands::Jump) {
|
||||
Some(FighterState::Jump(JumpState {
|
||||
jump_type: JumpType::DoubleJump,
|
||||
airborne_state_common: AirborneStateCommon::default(),
|
||||
}))
|
||||
} else {
|
||||
air_dodge::check_input(state_context)
|
||||
}
|
||||
air::air_interrupts_common(state_context, &self.airborne_state_common)
|
||||
}
|
||||
|
||||
fn update(&mut self, state_context: &mut UpdateContext) {
|
||||
|
||||
Reference in New Issue
Block a user