speedin-santa/Scripts/Effects/AnimationStartRandomizer.gd

10 lines
228 B
GDScript3
Raw Normal View History

2024-12-18 16:35:26 -05:00
extends AnimationPlayer
@export var startAnimation: String
# Called when the node enters the scene tree for the first time.
func _ready():
play(startAnimation)
advance(randf_range(0, get_animation(startAnimation).length))