first
This commit is contained in:
14
script/ButtonLogicImpulse.gd
Normal file
14
script/ButtonLogicImpulse.gd
Normal file
@@ -0,0 +1,14 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user