private void Jump() { bool feetOnGround = myFeet.isTouchingGround(); if (!(feetOnGround)) { return; } else if (Input.GetButtonDown("Jump")) { Vector2 jumpVelocityToAdd = new Vector2(0f, jumpSpeed); myRigidbody.velocity += jumpVelocityToAdd; AudioSource.PlayClipAtPoint(JumpSound, Camera.main.transform.position, soundVolume); } }