mooiere safe. soort van

This commit is contained in:
2023-01-31 22:05:28 +01:00
parent 9b7b25ff94
commit e046ed821e
5 changed files with 43 additions and 56 deletions
+1 -14
View File
@@ -6,15 +6,7 @@ var i = 0
func _ready():
sequence = $".."/Painting.sequence
var bmat = StandardMaterial3D.new()
bmat.emission_enabled = true
bmat.albedo_color = Color.LIGHT_SLATE_GRAY
bmat.emission = Color.LIGHT_BLUE
bmat.emission_intensity = 0.05
$ButtonUp.set_surface_override_material(0, bmat)
$ButtonLeft.set_surface_override_material(0, bmat)
$ButtonDown.set_surface_override_material(0, bmat)
$ButtonRight.set_surface_override_material(0, bmat)
func add_sequence_guess(dir):
if sequence[i] == dir:
@@ -22,10 +14,6 @@ func add_sequence_guess(dir):
i += 1
if (i == sequence.size()):
$Door.visible = false
$ButtonUp.visible = false
$ButtonDown.visible = false
$ButtonLeft.visible = false
$ButtonRight.visible = false
i = 0
else:
$Reset.playing = true
@@ -47,7 +35,6 @@ func _on_right_input_event(camera, event, position, normal, shape_idx):
if event is InputEventMouseButton and event.is_action_pressed("interact"):
add_sequence_guess(1)
func _on_flash_light_input_event(camera, event, position, normal, shape_idx):
if event is InputEventMouseButton and event.is_action_pressed("interact"):
$FlashLight.visible = false