public void MidAirMovement()
{
if (jumpPressed&&isOnground &&!isJump&&!isHeadBlocked )//普通状态--在地面上,非跳跃状态,上部没有遮挡、按下跳跃键
{
if (isCrouch)//下蹲状态,增量
{
StandUp();
playerRGB.AddForce(Vector2.up * crouchJumpBoost, ForceMode2D.Impulse);//F1+F2
}
isOnground = false;
isJump = true;
jumpTime = Time.time + jumpHodeDuration;
playerRGB.AddForce(Vector2.up * jumpForce, ForceMode2D.Impulse);//F1
}
else if (isJump )//长按状态
{
if (jumpHeld)//长按跳跃键
playerRGB.AddForce(Vector2.up * jumpHpdeFpoce, ForceMode2D.Impulse);//F1+F3
if (jumpTime < Time.time)
isJump = false;
}
}