Skip to content

Commit

Permalink
Stop decal timer on firing
Browse files Browse the repository at this point in the history
  • Loading branch information
TokisanGames committed Jan 4, 2024
1 parent 1e68194 commit 6d8a85e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions project/addons/terrain_3d/editor/components/ui.gd
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ func _enter_tree() -> void:
add_child(decal)
decal_timer = Timer.new()
decal_timer.wait_time = .5
decal_timer.timeout.connect(Callable(func(n):
if n:
get_tree().create_tween().tween_property(n, "albedo_mix", 0.0, 0.15)).bind(decal))
decal_timer.timeout.connect(Callable(func(node):
decal_timer.stop()
if node:
get_tree().create_tween().tween_property(node, "albedo_mix", 0.0, 0.15)).bind(decal))
add_child(decal_timer)


Expand Down

0 comments on commit 6d8a85e

Please sign in to comment.