15 lines
303 B
GDScript
15 lines
303 B
GDScript
extends Timer
|
|
class_name ButtonLogicImpulse
|
|
|
|
@export var interactBox: InteractBox
|
|
signal onPressed
|
|
|
|
func _ready() -> void:
|
|
interactBox.interactedWith.connect(onInteraction)
|
|
one_shot = true
|
|
|
|
func onInteraction(_playerReference: PlayerCharacter) -> void:
|
|
if is_stopped():
|
|
onPressed.emit()
|
|
start()
|