Various updates

Flashlight, fog, letter shader, safe audio
This commit is contained in:
2023-01-31 19:11:38 +01:00
parent 61a732a698
commit 9b7b25ff94
13 changed files with 162 additions and 30 deletions
+8 -3
View File
@@ -10,6 +10,7 @@ func _ready():
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)
@@ -17,10 +18,9 @@ func _ready():
func add_sequence_guess(dir):
if sequence[i] == dir:
print(".")
$Button.playing = true
i += 1
if (i == sequence.size()):
print("yay")
$Door.visible = false
$ButtonUp.visible = false
$ButtonDown.visible = false
@@ -28,7 +28,7 @@ func add_sequence_guess(dir):
$ButtonRight.visible = false
i = 0
else:
print("x")
$Reset.playing = true
i = 0
func _on_up_input_event(camera, event, position, normal, shape_idx):
@@ -46,3 +46,8 @@ func _on_down_input_event(camera, event, position, normal, shape_idx):
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