feat: game instruction shown in youth room for as long as no memento has been hovered and the room is not solved

This commit is contained in:
tiger tiger tiger 2026-01-23 16:05:09 +01:00
parent 34872b6b12
commit a07ec30716
4 changed files with 16 additions and 15 deletions

View File

@ -27,6 +27,9 @@ func start_room_async():
%LightAnimationPlayer.lights_on()
%SceneAnimationPlayer.start_soundtrack()
if not State.save_game.childhood_board_complete:
P.instruction.call_deferred("Find all three Momentos to collect all thoughts")
Scenes.player_enable.emit(true)

View File

@ -22,7 +22,7 @@ var tween: Tween = null
func _ready() -> void:
assert(frame and canvas_layer, "Interactable must have canvas and frame attached")
frame.modulate.a = 0.0
frame.modulate = Color.TRANSPARENT
light.visible = false
Scenes.player_enable.connect(_player_active) # TODO: do I have to clean this up?
@ -61,20 +61,19 @@ func expand() -> void:
frame.scale = Vector3(1.5, 1.5, 1.5)
tween = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_BACK)
tween.parallel().tween_property(frame, "modulate:a", 1.0, 2.0).set_trans(Tween.TRANS_QUAD)
tween.parallel().tween_property(frame, "modulate", Color.WHITE, 2.0).set_trans(Tween.TRANS_QUAD)
tween.parallel().tween_property(frame, "scale", Vector3.ONE, 1.0).set_trans(Tween.TRANS_QUART)
tween.parallel().tween_property(light, "light_energy", original_light_energy, 1.0).set_trans(Tween.TRANS_QUART)
func collapse() -> void:
P.clear()
if not shown: return
shown = false
P.clear()
if tween: tween.kill()
tween = create_tween().set_ease(Tween.EASE_IN).set_trans(Tween.TRANS_BACK)
tween.parallel().tween_property(frame, "modulate:a", 0, 0.5).set_trans(Tween.TRANS_QUAD)
tween.parallel().tween_property(frame, "modulate", Color.TRANSPARENT, 0.5).set_trans(Tween.TRANS_QUAD)
tween.parallel().tween_property(frame, "scale", Vector3.ONE * 2.0, 1.0).set_trans(Tween.TRANS_QUAD)
tween.parallel().tween_property(light, "light_energy", 0, 1.0).set_trans(Tween.TRANS_QUAD)
await tween.finished
@ -92,8 +91,7 @@ func _process_billboard() -> void:
func _process_hover() -> void:
if active and hover and not shown:
expand()
elif not hover and shown or shown and not active:
elif shown and not hover:
collapse()
func handle_input(event: InputEvent) -> void: