end_of_day_dialogue started

This commit is contained in:
Maurane
2025-06-12 16:41:09 +02:00
parent d5dc174535
commit 0730c6d40a
11 changed files with 181 additions and 90 deletions
+35 -17
View File
@@ -10,7 +10,6 @@ extends Control
var dialogue_intro = load("res://Dialogues/intro.dialogue")
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
@@ -38,7 +37,8 @@ func _ready() -> void:
title_screen.show()
#Connecting Signals
title_screen.connect("new_game_pressed", _on_new_game_pressed)
title_screen.connect("new_game_pressed", self._on_new_game_pressed)
screening_desk.connect("recovery_pressed", self._on_recovery_pressed)
pass
@@ -61,18 +61,16 @@ func _on_new_game_pressed():
TransitionScreen.mask.visible = true
#Skips the introduction
func skip_intro():
#Disconnecting the other Signal from the Confirmation Dialogue
UI.confirmation_no.disconnect("pressed", play_intro)
#Transitioning to Screening Desk
TransitionScreen.transition("big", [$TitleScreen], [$ScreeningDesk, UI, UI.get_node("UI/UpperContainer")])
await TransitionScreen.transition_finished
#Launching the gameplay loop
$ScreeningDesk.gameplay_loop("564")
#Starting Day Loop
start_day_loop()
#Plays the entire introduction
@@ -81,28 +79,48 @@ func play_intro():
#Disconnecting the other Signal from the Confirmation Dialogue
UI.confirmation_yes.disconnect("pressed", skip_intro)
#Introduction First slides
#Playing the Intro
#Text Slides
var text_container = $TextScreens/MarginContainer/IntroBoxContainer/TextContainer
TransitionScreen.transition("big", [$TitleScreen], [$TextScreens, text_container.get_child(0), UI, UI.get_node("UI/SkipContainer")])
TransitionScreen.transition("big", [$TitleScreen], [$TextScreens, $MarginContainer/IntroBoxContainer/Header, text_container.get_child(0), UI, UI.get_node("UI/SkipContainer")])
await UI.next_slide
for i in 4:
TransitionScreen.transition("small", [text_container.get_child(i)], [text_container.get_child(i+1)])
await UI.next_slide
#Dialogue in the Meeting Room
TransitionScreen.transition("big", [$TextScreens, text_container.get_child(4), UI, UI.get_node("UI/SkipContainer")], [$DialogueScreens])
#Meeting Room Dialogue
TransitionScreen.transition("big", [$TextScreens, $TextScreens/MarginContainer, text_container.get_child(4), UI, UI.get_node("UI/SkipContainer")], [$DialogueScreens])
await TransitionScreen.transition_finished
DialogueManager.show_dialogue_balloon(dialogue_intro, "start")
await DialogueManager.dialogue_ended
#Starting Day Loop
start_day_loop()
#Starts the Day Loop
func start_day_loop():
#Transitioning to Day Screen
$TextScreens/Day.text = "[center]DAY " + str(Globals.day_count) + "[/center]"
TransitionScreen.transition("big", [$DialogueScreens, $TitleScreen], [$TextScreens, $TextScreens/Day])
await TransitionScreen.transition_finished
await get_tree().create_timer(3.0).timeout
#Transitioning to the Screening Desk
TransitionScreen.transition("big", [$DialogueScreens], [$ScreeningDesk, UI, UI.get_node("UI/UpperContainer")])
TransitionScreen.transition("big", [$TextScreens, $TextScreens/Day], [$ScreeningDesk, $ScreeningDesk.alone_controls, UI, UI.get_node("UI/UpperContainer")])
await TransitionScreen.transition_finished
#Launching the gameplay loop
$ScreeningDesk.gameplay_loop("564")
#Finally starting the Game Loop
$ScreeningDesk.game_loop("564")
func _on_recovery_pressed():
var scenes_to_hide = [$ScreeningDesk.end_of_day_controls, $ScreeningDesk]
var scenes_to_show:Array[Node] = [$Bedroom]
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)