generated from krampus/template-godot4
22 lines
417 B
GDScript3
22 lines
417 B
GDScript3
|
extends GunkNode
|
||
|
## Periodically emits a pulse.
|
||
|
|
||
|
## Emitted at a regular interval.
|
||
|
signal pulsed
|
||
|
|
||
|
## Time in seconds between pulses.
|
||
|
@export var interval := 3.0
|
||
|
|
||
|
@onready var pulse_timer: Timer = %PulseTimer
|
||
|
@onready var animation_player: AnimationPlayer = %AnimationPlayer
|
||
|
|
||
|
|
||
|
func _ready() -> void:
|
||
|
pulse_timer.start(interval)
|
||
|
|
||
|
|
||
|
func pulse() -> void:
|
||
|
# TODO animation
|
||
|
animation_player.play("pulse")
|
||
|
pulsed.emit()
|