diff --git a/src/base-environments/youth_room/youth_room.gd b/src/base-environments/youth_room/youth_room.gd index d6a397c..112aec5 100644 --- a/src/base-environments/youth_room/youth_room.gd +++ b/src/base-environments/youth_room/youth_room.gd @@ -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) diff --git a/src/logic-scenes/card_picker/card_picker.gd b/src/logic-scenes/card_picker/card_picker.gd index 375b1a0..81eff1c 100644 --- a/src/logic-scenes/card_picker/card_picker.gd +++ b/src/logic-scenes/card_picker/card_picker.gd @@ -1,4 +1,4 @@ -class_name CardPicker +class_name CardPicker extends Playable #fixme INI is probably redundant. @@ -36,7 +36,7 @@ var curr_selection_id: int = -1: if selection_state == CARDS or selection_state == POSTS: # Wrap around curr_selection_id = new_id % options.size() - + # Update all highlights for i in range(options.size()): options[i].highlighted = (i == curr_selection_id) @@ -107,15 +107,15 @@ func _input(event : InputEvent) -> void: if event.is_action_pressed("ui_up") or event.is_action_pressed("ui_left"): curr_selection_id -= 1 elif event.is_action_pressed("ui_down") or event.is_action_pressed("ui_right"): - curr_selection_id += 1 + curr_selection_id += 1 # Selection elif event.is_action_pressed("ui_accept"): - pick(curr_selection_id) + pick(curr_selection_id) func pick(id: int) -> void: - print("%s picked card %s at id %d" % [name, options[id].text, id]) + print("%s picked card %s at id %d" % [name, options[id].text, id]) if id == -1: curr_selection_id = 0 return @@ -204,7 +204,7 @@ func show_posts(): func handle_hover(draggable: Draggable) -> void: if _input_locked: return - + draggable.highlighted = draggable.mouse_over if draggable.mouse_over: curr_selection_id = options.find(draggable) @@ -212,7 +212,7 @@ func handle_hover(draggable: Draggable) -> void: func handle_mouse_button(event: InputEventMouseButton, draggable: Draggable) -> void: if _input_locked: return - + if event.button_index == MOUSE_BUTTON_LEFT and event.is_pressed() and not event.is_echo(): pick(options.find(draggable)) diff --git a/src/logic-scenes/interactable/interactable.gd b/src/logic-scenes/interactable/interactable.gd index 6b10bb2..af61a42 100644 --- a/src/logic-scenes/interactable/interactable.gd +++ b/src/logic-scenes/interactable/interactable.gd @@ -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: diff --git a/src/ui/prompter/prompter.gd b/src/ui/prompter/prompter.gd index 326cfc3..32884b7 100644 --- a/src/ui/prompter/prompter.gd +++ b/src/ui/prompter/prompter.gd @@ -11,7 +11,7 @@ static var _instance : Prompter = null func _ready() -> void: _register_prompts() clear() - + func _register_prompts() -> void: assert(not _instance, "Cannot have two prompters (are you trying to run the prompter itself?)")