Files
SpaceBots/.svn/pristine/9e/9eed736bcb63d2e8e28d34a45ab1d72ca53ce9e3.svn-base

13 lines
329 B
Plaintext
Raw Normal View History

2026-01-21 23:51:53 +01:00
extends Node
class_name ButtonLogicToggle
@export var interactBox: InteractBox
@export var state: bool = false #Is it on or off? :) hope this helps it is currently 1:42 am
func _ready() -> void:
interactBox.interactedWith.connect(onInteraction)
func onInteraction(_playerReference: PlayerCharacter) -> void:
state = !state