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