示例#1
0
    void UpdateDash(ref float targetSpeed)
    {
        if (dashing.Ready)
        {
            if (featureInput && canMove)
            {
                if (!MovementInput)
                {
                    verticalInput = 1;
                }

                dashVertical   = verticalInput;
                dashHorizontal = horizontalInput;

                dashing.Activate();
                anim.SetBool("dashing", true);
            }
        }

        if (dashing.Dashing)
        {
            targetSpeed        = dashing.DashSpeed;
            verticalMovement   = dashVertical * camManager.transform.forward;
            horizontalMovement = dashHorizontal * camManager.transform.right;
        }

        if (dashing.DashStop)
        {
            anim.SetBool("dashing", false);
        }
    }
示例#2
0
    void UpdateDash(ref float targetSpeed)
    {
        if (dashing.Ready)
        {
            if (FeatureInput && canMove)
            {
                dashing.Activate();
                anim.SetBool("dashing", true);
            }
        }

        if (dashing.Dashing)
        {
            targetSpeed = dashing.DashSpeed;
        }


        if (dashing.DashStop)
        {
            targetSpeed = moveSpeed;
            anim.SetBool("dashing", false);
        }
    }