コード例 #1
0
    public void NewJump()
    {
        if (Input.GetButtonDown("Jump"))
        {
            if (OnGround)
            {
                if (!Patted())
                {
                    isJumping = true;
                    Jump(jumpForce);
                    jumpTimeCounter = jumpTime;

                    if (state == MovementState.G_Sliding)
                    {
                        StopSlide();
                    }
                    fx.JumpingParticle();
                    animator.SetBool("Jump", true);
                }
            }
            else if (secondJump)
            {
                secondJump = false;
                if (!Patted())
                {
                    isJumping       = true;
                    jumpTimeCounter = jumpTime;
                    Jump(jumpForce);
                    fx.JumpingParticle();
                }
            }
        }
        HoldJump();
    }