Diffstat (limited to 'bullets/scripts/Laser.gd')
-rw-r--r--bullets/scripts/Laser.gd10
1 files changed, 5 insertions, 5 deletions
diff --git a/bullets/scripts/Laser.gd b/bullets/scripts/Laser.gd
index 8006ea9..96dc24a 100644
--- a/bullets/scripts/Laser.gd
+++ b/bullets/scripts/Laser.gd
@@ -82,12 +82,12 @@ func _on_VisibilityNotifier2D_screen_exited():
func _physics_process(delta):
- if light.enabled:
- light.color.a -= modulate_amount * delta
- if light.color.a < 0:
- light.enabled = false
- set_physics_process(false)
+ light.color.a -= modulate_amount * delta
+ if light.color.a < 0:
+ light.enabled = false
+ set_physics_process(false)
func set_lights(enabled: bool) -> void:
light.enabled = enabled
+ set_physics_process(enabled)