fixed combining branch
This commit is contained in:
		@@ -97,6 +97,12 @@ public class PlayerMovement : MonoBehaviour
 | 
			
		||||
            CheckDirectionToFace(_moveInput.x > 0);
 | 
			
		||||
        #endregion
 | 
			
		||||
 | 
			
		||||
        if (!IsJumping) {
 | 
			
		||||
            print("not jumping");
 | 
			
		||||
        } else {
 | 
			
		||||
            print("jumping, " + RB.velocity.y);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #region COLLISION CHECKS
 | 
			
		||||
        if (!IsJumping)
 | 
			
		||||
        {
 | 
			
		||||
@@ -119,12 +125,14 @@ public class PlayerMovement : MonoBehaviour
 | 
			
		||||
 | 
			
		||||
            //Two checks needed for both left and right walls since whenever the play turns the wall checkPoints swap sides
 | 
			
		||||
            LastOnWallTime = Mathf.Max(LastOnWallLeftTime, LastOnWallRightTime);
 | 
			
		||||
        }
 | 
			
		||||
        #endregion
 | 
			
		||||
 | 
			
		||||
        #region JUMP CHECKS
 | 
			
		||||
        if (IsJumping && RB.velocity.y < 0)
 | 
			
		||||
        if (IsJumping && RB.velocity.y <= 0)
 | 
			
		||||
        {
 | 
			
		||||
            IsJumping = false;
 | 
			
		||||
            print("isJumping " + IsJumping);
 | 
			
		||||
 | 
			
		||||
            if (!IsWallJumping)
 | 
			
		||||
                _isJumpFalling = true;
 | 
			
		||||
@@ -216,7 +224,6 @@ public class PlayerMovement : MonoBehaviour
 | 
			
		||||
            SetGravityScale(Data.gravityScale);
 | 
			
		||||
        }
 | 
			
		||||
        #endregion
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void FixedUpdate()
 | 
			
		||||
@@ -419,6 +426,7 @@ public class PlayerMovement : MonoBehaviour
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public bool IsGrounded() {
 | 
			
		||||
        // print(Physics2D.OverlapBox(this.transform.position, _groundCheckSize, 0, _groundLayer) && !IsJumping);
 | 
			
		||||
        return (Physics2D.OverlapBox(this.transform.position, _groundCheckSize, 0, _groundLayer) && !IsJumping);
 | 
			
		||||
    }
 | 
			
		||||
    #endregion
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user