2d platformer, Mid-air control.

I’m making a 2d platformer, I would like to know how to have control in mid-air.

  public function Update () : void {
    	//If our character isn’t jumping
    	if (!b_isJumping) {	
    		if (Input.GetButton("Horizontal")) {
    			in_direction = Input.GetAxis("Horizontal") < 0 ? -1 : 1;
    			rigidbody.velocity = new Vector3((in_direction*f_speed), rigidbody.velocity.y, 0);
    			//Reset Stay animation frame back to the first frame
    			//Update Walking animation while the character is walking
    			loopSprites[1].UpdateAnimation(in_direction, renderer.material);
    		} else {
    			//Reset Walking animation frame back to the first frame
    			//Update Stay animation while the character is not walking
    			loopSprites[0].UpdateAnimation(in_direction, renderer.material);
    		if (Input.GetButton("Jump")) {
    			b_isJumping = true;
    			//Then make it Jump
    			audio.volume = 0.3;
    			rigidbody.velocity = new Vector3(rigidbody.velocity.x, -Physics.gravity.y, 0);
    	} else {
    		//update animation while it Jump
    		jumpSprite.UpdateJumpAnimation(in_direction, rigidbody.velocity.y, renderer.material);

The same way you’re controlling it on the ground. Put it in the second else statement; and adjust it as you see fit so that the movement in midair is less than when grounded. (f_speed *.25) for example.

It looks like your character does not accelerate but only moves at a fixed speed? You probably should change that. Even the original NES Mario sped up and slowed down.