extends Node3D ## Autoplays all animations in the AnimationPlayer simultaneously and loops them. ## Attach to any node that has an AnimationPlayer child (e.g. tekton_fishing_animation instances). @onready var anim_player: AnimationPlayer = $AnimationPlayer func _ready() -> void: if not anim_player: push_warning("tekton_fishing_autoplay: No AnimationPlayer found") return # Wait one frame for the scene tree to settle await get_tree().process_frame # Play every animation simultaneously, all looping for anim_name in anim_player.get_animation_list(): anim_player.play(anim_name) anim_player.advance(0.0) # ensure it starts # Set all to loop for anim_name in anim_player.get_animation_list(): var anim: Animation = anim_player.get_animation(anim_name) if anim: anim.loop_mode = Animation.LOOP_LINEAR