From beb9485ee46882b1de4541a71eab5e572bd793a2 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 3 Apr 2022 00:14:43 +0200 Subject: [PATCH] :wrench: Add `intensity_changed` signal to Fire --- src/entities/Fire.gd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/entities/Fire.gd b/src/entities/Fire.gd index d655563..da20bd3 100644 --- a/src/entities/Fire.gd +++ b/src/entities/Fire.gd @@ -6,6 +6,7 @@ export var change_per_second: float = - 1.0 / 60.0 export var min_intensity: float = 0 export var max_intensity: float = INF +signal intensity_changed(value) signal intensity_at_max signal intensity_at_min var intensity_reached_max_triggered: bool = false @@ -19,6 +20,7 @@ func set_intensity(value): # Update everything that needs to be updated when the intensity changes $Light.texture_scale = value # Trigger signals + emit_signal("intensity_changed", intensity) # max intensity signal if intensity == max_intensity: emit_signal("intensity_at_max")