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:
@@ -9,6 +9,7 @@ use bevy_ggrs::{PlayerInputs, Rollback};
|
||||
use strum::IntoEnumIterator;
|
||||
use strum_macros::EnumIter;
|
||||
|
||||
use crate::fighter::FighterFacingDirection;
|
||||
use crate::fighter::attack::AttackKind;
|
||||
use crate::game_settings::GameSettings;
|
||||
use crate::input::FighterInputFrame;
|
||||
@@ -54,6 +55,26 @@ impl FighterAttackCommandType {
|
||||
FighterAttackCommandType::TiltAttackRight => AttackKind::ForwardTilt,
|
||||
}
|
||||
}
|
||||
pub fn to_attack_kind_airborne(&self, facing_direction: &FighterFacingDirection) -> AttackKind {
|
||||
match self {
|
||||
FighterAttackCommandType::Neutral => AttackKind::NeutralAir,
|
||||
FighterAttackCommandType::SmashAttackUp | FighterAttackCommandType::TiltAttackUp => AttackKind::UpAir,
|
||||
FighterAttackCommandType::SmashAttackDown | FighterAttackCommandType::TiltAttackDown => AttackKind::DownAir,
|
||||
|
||||
FighterAttackCommandType::SmashAttackLeft | FighterAttackCommandType::TiltAttackLeft => {
|
||||
match facing_direction {
|
||||
FighterFacingDirection::Left => AttackKind::ForwardAir,
|
||||
FighterFacingDirection::Right => AttackKind::BackAir,
|
||||
}
|
||||
},
|
||||
FighterAttackCommandType::SmashAttackRight | FighterAttackCommandType::TiltAttackRight => {
|
||||
match facing_direction {
|
||||
FighterFacingDirection::Left => AttackKind::BackAir,
|
||||
FighterFacingDirection::Right => AttackKind::ForwardAir,
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Frames of life remaining for each buffered command. Indexed by
|
||||
|
||||
Reference in New Issue
Block a user