예제 #1
0
 public void ManageDash() //If player is stunned, cancel dash, else continue
 {
     animator.AnimatorDash();
     if (!state.stunned && !state.onWall)
     {
         if (timers.dashTimer <= 0.0f)
         {
             if (dashAttacking)
             {
                 StartDashAttack();
             }
             else
             {
                 ResetDash();
             }
         }
     }
     else
     {
         state.dashing = false;
         animator.AnimatorDash();
         if (!state.stunned)
         {
             state.control = true;
         }
     }
 }
예제 #2
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();
 }