15 lines
303 B
Plaintext
15 lines
303 B
Plaintext
|
|
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()
|