19 lines
344 B
GDScript
19 lines
344 B
GDScript
extends VBoxContainer
|
|
|
|
@export var keySwitchHasKey:bool
|
|
|
|
@export var lightText:String
|
|
|
|
@export var keyText:String
|
|
|
|
|
|
signal clickKeySwitchSignal(openLight:bool)
|
|
|
|
func _ready() -> void:
|
|
$Light/MarginContainer/Label.text=lightText
|
|
if keySwitchHasKey:
|
|
$Key.visible = true
|
|
$Key/MarginContainer/Label.text=keyText
|
|
else:
|
|
$Key.visible = false
|