Fixed minor particle issues.

This commit is contained in:
Tanner Van Teeffelen 2025-12-31 20:21:41 -05:00
parent 9a09776900
commit 9d5fe34ad8

View file

@ -33,8 +33,10 @@ func _physics_process(delta: float) -> void:
if Input.is_action_just_pressed("flip") and (is_on_floor() or is_on_ceiling()):
al_globals.gravity *= -1
if velocity.y > 500:
if velocity.y > 500 and not (is_on_floor() or is_on_ceiling()):
particles.emitting = true
else:
particles.emitting = false
move_and_slide() #Allow physics control.
spike_detection() #Checks for tiles with the "Spike" custom data enabled.
@ -71,7 +73,6 @@ func respawn() -> void:
position.x = level.startPosX
position.y = level.startPosY
func _on_visible_on_screen_notifier_2d_screen_exited() -> void:
if !dead:
death(true)