nieuwe kamer nieuwe kansen

This commit is contained in:
2023-02-04 17:08:11 +01:00
parent 46897a2742
commit dc6ab7c5cd
9 changed files with 227 additions and 14 deletions
+1
View File
@@ -30,6 +30,7 @@ func _physics_process(delta):
move_and_slide()
func _on_flash_light_input_event(camera, event, position, normal, shape_idx):
print("joehoe")
if event is InputEventMouseButton and event.is_action_pressed("interact"):
$Pivot/Camera/FlashLight.visible = true
has_flashlight = true
+15 -10
View File
@@ -1,15 +1,13 @@
extends Node3D
@onready var indirect_light = $"../IndirectLight"
@onready var dakraam = $"../Room/Dakraam"
@onready var light = $"../Light"
var dakraam_glas
# 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
if dakraam:
dakraam_glas = $"../Room/Dakraam".get_surface_override_material(0)
func _on_lock_input_event(camera, event, position, normal, shape_idx):
if event is InputEventMouseButton and event.is_action_pressed("interact"):
@@ -20,5 +18,12 @@ func _on_lock_input_event(camera, event, position, normal, shape_idx):
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 + 180
$".."/Light.visible = !$".."/Light.visible
$Lever.rotation.z = $Lever.rotation.z + PI
if light != null:
light.visible = !light.visible
else:
indirect_light.visible = !indirect_light.visible
if indirect_light.visible:
dakraam.set_surface_override_material(0, dakraam_glas)
else:
dakraam.set_surface_override_material(0, null)