//States public void Reset_State() { onGround = false; onWall = false; onSlope = false; onQuicksand = false; againstCeiling = false; airborne = true; descending = false; control = true; jumping = false; doubleJumping = false; wantToJump = false; attacking = false; diving = false; diveHit = false; pivoting = false; dashing = false; dashReady = false; dashAttacking = false; sprinting = false; wallSliding = false; wallClimbing = false; wallJumping = false; attacked = false; stunned = false; immune = false; jumpCount = 0; animator.AnimatorGrounded(); animator.AnimatorAirborne(); animator.AnimatorJump(); animator.AnimatorDoubleJump(); animator.AnimatorAttack(); animator.AnimatorDive(); animator.AnimatorDiveAttack(); animator.AnimatorMomentum(); animator.AnimatorPivot(); animator.AnimatorDash(); animator.AnimatorDashAttack(); animator.AnimatorSpeedX(velocity.x); animator.AnimatorSpeedY(velocity.y); animator.AnimatorWallSlide(); animator.AnimatorWallClimb(); animator.AnimatorWallJump(); animator.AnimatorStunned(); }
public void ManageDashAttack() //If player is stunned, cancel dash attack, else continue { animator.AnimatorDash(); animator.AnimatorDashAttack(); if (!state.stunned) { if (timers.dashAttackTimer <= 0.0f) { state.dashAttacking = false; animator.AnimatorDashAttack(); state.control = true; leftWallCheck.attacking = false; rightWallCheck.attacking = false; } } else { state.dashAttacking = false; animator.AnimatorDashAttack(); leftWallCheck.attacking = false; rightWallCheck.attacking = false; } }