game_loop nearly done

This commit is contained in:
2025-06-12 22:23:52 +02:00
parent 0730c6d40a
commit 402d44e2bb
30 changed files with 136 additions and 173 deletions
+24 -6
View File
@@ -7,9 +7,6 @@ extends Control
@export var DialogueScreens: PackedScene
var dialogue_intro = load("res://Dialogues/intro.dialogue")
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
@@ -83,7 +80,7 @@ func play_intro():
#Text Slides
var text_container = $TextScreens/MarginContainer/IntroBoxContainer/TextContainer
TransitionScreen.transition("big", [$TitleScreen], [$TextScreens, $MarginContainer/IntroBoxContainer/Header, text_container.get_child(0), UI, UI.get_node("UI/SkipContainer")])
TransitionScreen.transition("big", [$TitleScreen], [$TextScreens, $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)])
@@ -93,7 +90,7 @@ func play_intro():
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")
DialogueManager.show_dialogue_balloon(Globals.dialogue_intro, "start")
await DialogueManager.dialogue_ended
#Starting Day Loop
@@ -115,7 +112,7 @@ func start_day_loop():
await TransitionScreen.transition_finished
#Finally starting the Game Loop
$ScreeningDesk.game_loop("564")
$ScreeningDesk.new_patient("564")
@@ -124,3 +121,24 @@ 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)
await TransitionScreen.transition_finished
DialogueManager.show_dialogue_balloon(Globals.dialogue_recovery, "end_of_day_" + str(Globals.day_count))
await DialogueManager.dialogue_ended
Globals.day_count += 1
#Transitioning to Day Screen
$TextScreens/Day.text = "[center]DAY " + str(Globals.day_count) + "[/center]"
scenes_to_hide = [$Bedroom]
scenes_to_show = [$TextScreens, $TextScreens/Day]
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)
await TransitionScreen.transition_finished
await get_tree().create_timer(3.0).timeout
#Transitioning to Screening Desk
scenes_to_hide = scenes_to_show
scenes_to_show = [$ScreeningDesk, $ScreeningDesk.alone_controls]
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)
await TransitionScreen.transition_finished
$ScreeningDesk.new_patient("564")