void Jump() { if (!isGrounded) { if (FacingAndTouchingWall() && UnlockTable.PowerActive(UnlockID.WallJump)) { WallJump(); } else if (UnlockTable.PowerActive(UnlockID.AirJump)) { AirJump(); } return; } // float jumpForce = 400f; // _rigidbody.AddForce(Vector3.up * jumpForce); _anim.PlayJumpSound(); Vector3 vel = _rigidbody.velocity; vel.y = jumpSpeed; _rigidbody.velocity = vel; GameObject spark = Instantiate(GameController.instance.hitSparkPrefab); spark.transform.position = transform.position; }