From 43ece2370c95e9cfdb3dc994a68b4e23090b4279 Mon Sep 17 00:00:00 2001 From: dpDeadlyPuzzles <1976985776@qq.com> Date: Fri, 12 Jul 2024 17:27:14 +0800 Subject: [PATCH] feat: seedler add attack_finished signal --- scenes/weapons/seedler/seedler.gd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scenes/weapons/seedler/seedler.gd b/scenes/weapons/seedler/seedler.gd index c2f2c47..ee89328 100644 --- a/scenes/weapons/seedler/seedler.gd +++ b/scenes/weapons/seedler/seedler.gd @@ -1,5 +1,6 @@ extends Sprite2D +signal attack_finished const TIMES = 5 @onready var path = $"../Path2D" @onready var follow = $"../Path2D/PathFollow2D" @@ -34,7 +35,9 @@ func start() -> void: movement.tween_method(move, mid, end, 1.25) var exit = create_tween() exit.tween_interval(TIMES * 2.5) + exit.tween_callback(attack_finished.emit) exit.tween_callback(queue_free) + var rotate_tween = create_tween().set_loops(TIMES) rotate_tween.tween_property(self, "rotation", TAU * 5, 2.5) rotate_tween.tween_callback(func(): rotation = 0)