dialogue: Abnormality Rules

This commit is contained in:
Maurane
2025-06-08 03:23:46 +02:00
parent 16221a9e33
commit d4f9a165dc
81 changed files with 14777 additions and 18 deletions
+10 -11
View File
@@ -1,8 +1,12 @@
extends Control
@export var TitleScreen: PackedScene
@export var Office: PackedScene
@export var Bedroom: PackedScene
@export var TextScreens: PackedScene
@export var DialogueScreens: PackedScene
var dialogue_intro = load("res://Dialogues/intro.dialogue")
# Called when the node enters the scene tree for the first time.
@@ -13,24 +17,20 @@ func _ready() -> void:
var office = Office.instantiate()
var bedroom = Bedroom.instantiate()
var text_screens = TextScreens.instantiate()
var dialogue_screens = DialogueScreens.instantiate()
add_child(title_screen)
add_child(office)
add_child(bedroom)
add_child(text_screens)
add_child(dialogue_screens)
#Naming Scenes
title_screen.name = "TitleScreen"
office.name = "Office"
bedroom.name = "Bedroom"
text_screens.name = "TextScreens"
#Hiding Scenes
title_screen.hide()
office.hide()
bedroom.hide()
dialogue_screens.name = "DialogueScreens"
#Showing TitleScreen
title_screen.show()
@@ -38,9 +38,6 @@ func _ready() -> void:
#Connecting Signals
title_screen.connect("new_game_pressed", _on_new_game_pressed)
#get_tree().change_scene_to_file("res://corridor.tscn")
pass
@@ -61,8 +58,10 @@ func _on_new_game_pressed():
transition("small", [text_container.get_child(i)], [text_container.get_child(i+1)])
await $TextScreens.next_slide
transition("big", [$TextScreens, text_container.get_child(4)], [$Office])
transition("big", [$TextScreens, text_container.get_child(4)], [$DialogueScreens])
await $TextScreens.next_slide
$DialogueScreens.dialogue(dialogue_intro, "start")
# Takes care of fading transitions between scenes
func transition(size, scenes_to_hide, scenes_to_show):