Implement invulnerability/intangibility and sakurai angle (#78)
Reviewed-on: #78 Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #78.
This commit is contained in:
@@ -33,14 +33,9 @@ impl FighterStateImpl for AirDodgeState {
|
||||
}
|
||||
|
||||
fn update(&mut self, state_context: &mut UpdateContext) {
|
||||
let airdodge_intangible_end = state_context.fighter_attributes.air_dodge_intangible_start
|
||||
+ state_context
|
||||
.fighter_attributes
|
||||
.air_dodge_intangible_duration;
|
||||
if state_context.animation_frame
|
||||
== state_context.fighter_attributes.air_dodge_intangible_start
|
||||
{
|
||||
*state_context.vulnerability = FighterInvulnerabilityState::Intangible;
|
||||
let airdodge_intangible_end = state_context.fighter_attributes.air_dodge_intangible_start + state_context.fighter_attributes.air_dodge_intangible_duration;
|
||||
if state_context.animation_frame == state_context.fighter_attributes.air_dodge_intangible_start {
|
||||
*state_context.vulnerability = FighterInvulnerabilityState::Intangible { frames_remaining: Some(state_context.fighter_attributes.air_dodge_intangible_duration) };
|
||||
} else if state_context.animation_frame >= airdodge_intangible_end {
|
||||
*state_context.vulnerability = FighterInvulnerabilityState::Vulnerable;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user