25 lines
714 B
GDScript
25 lines
714 B
GDScript
extends Node3D
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
pass # Replace with function body.
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta):
|
|
pass
|
|
|
|
|
|
func _on_lock_input_event(camera, event, position, normal, shape_idx):
|
|
if event is InputEventMouseButton and event.is_action_pressed("interact"):
|
|
if get_node("../Player").has_key:
|
|
$Deur.visible = false
|
|
$Lock.visible = false
|
|
|
|
|
|
func _on_lever_input_event(camera, event, position, normal, shape_idx):
|
|
if event is InputEventMouseButton and event.is_action_pressed("interact"):
|
|
$Lever.rotation.z = $Lever.rotation.z + PI
|
|
$".."/Light.visible = !$".."/Light.visible
|