Skip to content

Commit

Permalink
feat: seedler add attack_finished signal
Browse files Browse the repository at this point in the history
  • Loading branch information
wlywlywlywly committed Jul 12, 2024
1 parent 05dd84d commit 43ece23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scenes/weapons/seedler/seedler.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
extends Sprite2D

signal attack_finished
const TIMES = 5
@onready var path = $"../Path2D"
@onready var follow = $"../Path2D/PathFollow2D"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 43ece23

Please sign in to comment.