This commit is contained in:
Dan Baker 2025-12-02 07:45:23 +00:00
parent 7a8ee29dcb
commit 0fe23420ab
800 changed files with 16547 additions and 0 deletions

View file

@ -0,0 +1,22 @@
extends Sprite2D
@export var fade_duration: float = 0.5
var tween: Tween
func _ready():
# Start with outline invisible
material.set_shader_parameter("outline_alpha", 0.0)
start_continuous_fade()
func start_continuous_fade():
tween = create_tween()
tween.set_loops() # Makes it loop infinitely
tween.tween_method(set_outline_alpha, 0.0, 1.0, fade_duration)
tween.tween_method(set_outline_alpha, 1.0, 0.0, fade_duration)
func set_outline_alpha(value: float):
material.set_shader_parameter("outline_alpha", value)
func stop_fade():
if tween:
tween.kill()