Implement up smash, dacus and further improve input system. (#88)
Reviewed-on: #88 Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #88.
This commit is contained in:
@@ -21,6 +21,19 @@ impl FighterStateImpl for GroundAttackState {
|
||||
const NAME: &'static str = "GroundAttack";
|
||||
|
||||
fn check_interrupt(&self, state_context: &mut InterruptContext) -> Option<FighterState> {
|
||||
// Allow interrupting dash attack only into an up/down smash
|
||||
if let AttackKind::DashAttack = self.attack_kind {
|
||||
if state_context.get_current_animation_frame() < state_context.fighter_attributes.dash_attack_cancel_window {
|
||||
if let Some(state) = check_interrupt(state_context) {
|
||||
if let FighterState::GroundAttack(state) = state {
|
||||
if matches!(state.attack_kind, AttackKind::UpSmash) || matches!(state.attack_kind, AttackKind::DownSmash) {
|
||||
return Some(FighterState::GroundAttack(state));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if state_context.is_current_animation_finished() {
|
||||
Some(FighterState::Wait(WaitState))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user