SpielBackupAlt/scripts/Fuse Box.gd

21 lines
347 B
GDScript3
Raw Permalink Normal View History

2024-12-26 14:54:06 +00:00
extends StaticBody
export(Array, NodePath) var connectedLights : Array
var lights = []
func _ready():
for path in connectedLights:
lights.push_back(get_node(path))
var on = true
func interact(_relate):
if on:
on = false
for light in lights:
light.hide()
else:
on = true
for light in lights:
light.show()