Early switch scripts working
This commit is contained in:
13
levels/switchcontroller.gd
Normal file
13
levels/switchcontroller.gd
Normal file
@@ -0,0 +1,13 @@
|
||||
extends Node
|
||||
|
||||
@export var door : Node
|
||||
@export var switch : Node
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
if switch.switched_on:
|
||||
door.state_change(switch.switched_on)
|
||||
Reference in New Issue
Block a user