Bläddra i källkod

Merge pull request #80 from dnleek/airborne

On jump input, immediately increase airborne time to MIN_AIRBORNE_TIME.
Aaron Franke 5 år sedan
förälder
incheckning
0de69929ee
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. 2 0
      player/player.gd

+ 2 - 0
player/player.gd

@@ -108,6 +108,8 @@ func _physics_process(delta):
 	if not on_air and Input.is_action_just_pressed("jump"):
 		velocity.y = JUMP_SPEED
 		on_air = true
+		# Increase airborne time so next frame on_air is still true
+		airborne_time = MIN_AIRBORNE_TIME
 		animation_tree["parameters/state/current"] = 2
 		sound_effect_jump.play()