Example #1
0
 //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();
 }
Example #2
0
 public void ManageAttack() //If player is stunned or attack timer is up, cancel attack animation, else continue
 {
     animator.AnimatorAttack();
     if (!state.stunned)
     {
         if (timers.attackTimer <= 0.0f)
         {
             state.attacking = false;
             animator.AnimatorAttack();
             state.control            = true;
             leftWallCheck.attacking  = false;
             rightWallCheck.attacking = false;
         }
     }
     else if (state.stunned)
     {
         state.attacking = false;
         animator.AnimatorAttack();
         leftWallCheck.attacking  = false;
         rightWallCheck.attacking = false;
     }
 }