class_name Effect extends Node signal duration_finished signal tick_finished var duration: float = 0.0 var DurationTimer: Timer var tick: float = 0.0 var TickTimer: Timer func _ready(): pass func set_duration(value: float): duration = value if not DurationTimer: DurationTimer = Timer.new() DurationTimer.timeout.connect(func(): duration_finished.emit() queue_free() ) add_child(DurationTimer) DurationTimer.wait_time = duration DurationTimer.start() func set_tick(value: float): tick = value if not TickTimer: TickTimer = Timer.new() TickTimer.timeout.connect(func(): tick_finished.emit() TickTimer.start() ) add_child(TickTimer) TickTimer.wait_time = tick TickTimer.start()