public AttackProperties(int Hitstun, int Blockstun, int Damage, int Push, AttackAngle Angle) : this() { hitStun = Hitstun; blockStun = Blockstun; damage = Damage; push = Push; angle = Angle; }
public bool CheckBlocking(AttackAngle angle) { switch (angle) { case AttackAngle.Low: if (!ReturnFlipState()) { if (ReturnMoveState() == Moves.CrouchLeft) { return(true); } } else if (ReturnFlipState()) { if (ReturnMoveState() == Moves.CrouchRight) { return(true); } } break; case AttackAngle.Mid: if (!ReturnFlipState()) { if (ReturnMoveState() == Moves.CrouchLeft || ReturnMoveState() == Moves.WalkLeft) { return(true); } } else if (ReturnFlipState()) { if (ReturnMoveState() == Moves.CrouchRight || ReturnMoveState() == Moves.WalkRight) { return(true); } } break; case AttackAngle.High: if (!ReturnFlipState()) { if (ReturnMoveState() == Moves.WalkLeft) { return(true); } } else if (ReturnFlipState()) { if (ReturnMoveState() == Moves.WalkRight) { return(true); } } break; } return(false); }
public void SetStateTimer(Moves move, int hitFrames, int blockFrames, AttackAngle angle) { if (move == Moves.Blocking) { SetMoveState(Moves.Blocking); PlayerBlocked(this, new EvolutionEventArgs(Moves.Blocking)); stateTimer.Interval = (blockFrames * 1000) / 60; stateTimer.Start(); } else if (move == Moves.BeingHit) { SetMoveState(move); PlayerStruck(this, new EvolutionEventArgs(Moves.BeingHit)); stateTimer.Interval = (hitFrames * 1000) / 60; stateTimer.Start(); } }
public void OnPlayerAttacked(object sender, EvolutionEventArgs e) { attacksWithoutBeingHit++; damageInFrames += e.attackProperties.damage; if (e.attackProperties.angle == AttackAngle.High) { attacksFromAirCount++; } switch (lastAttackAngle) { case AttackAngle.Low: if (e.attackProperties.angle == AttackAngle.High) { variedAttacksCount++; } else { variedAttacksCount = 0; } break; case AttackAngle.High: if (e.attackProperties.angle == AttackAngle.Low) { variedAttacksCount++; } else { variedAttacksCount = 0; } break; case AttackAngle.Mid: variedAttacksCount = 0; break; default: break; } lastAttackAngle = e.attackProperties.angle; }