Gameplay Loop début
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 2.4 MiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://ddddcly3c0ag3"
|
||||||
|
path="res://.godot/imported/patient_564_angry.png-233db4ed2aa1c2073b958ddf3fc7fd0f.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Art/Patients/patient_564/patient_564_angry.png"
|
||||||
|
dest_files=["res://.godot/imported/patient_564_angry.png-233db4ed2aa1c2073b958ddf3fc7fd0f.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 2.4 MiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dde2f1rn6vtpl"
|
||||||
|
path="res://.godot/imported/patient_564_sad.png-e66ee7c3da902a9f0c5751be3544ba92.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Art/Patients/patient_564/patient_564_sad.png"
|
||||||
|
dest_files=["res://.godot/imported/patient_564_sad.png-e66ee7c3da902a9f0c5751be3544ba92.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 2.4 MiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c0ss3tjfygbkn"
|
||||||
|
path="res://.godot/imported/patient_564_scared.png-ae3b888b68aaaf578da7958a2f43ed3b.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Art/Patients/patient_564/patient_564_scared.png"
|
||||||
|
dest_files=["res://.godot/imported/patient_564_scared.png-ae3b888b68aaaf578da7958a2f43ed3b.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
@@ -2,6 +2,32 @@
|
|||||||
|
|
||||||
The patient remains still, watching you expectantly.
|
The patient remains still, watching you expectantly.
|
||||||
|
|
||||||
Vladislav Orleg: [#smiling] Hello, i'm patient #564, nice to meet you !
|
Vladislav Orleg: [#smiling] Hello, i'm smiling !
|
||||||
|
Vladislav Orleg: [#angry] Now i'm very angry !
|
||||||
|
Vladislav Orleg: [#scared] Suddenly i'm scared !
|
||||||
|
Vladislav Orleg: There is no change of emotion, i'm still scared !
|
||||||
|
Vladislav Orleg: [#neutral] I'm neutral again.
|
||||||
|
Vladislav Orleg: [#sad] I'm depressed...
|
||||||
|
You: Alright, you're going to Containment you bastard.
|
||||||
|
Vladislav Orleg: [#scared] Nooooooo !!!
|
||||||
|
|
||||||
|
=> END
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
~ containment
|
||||||
|
|
||||||
|
You activate the switch concealed beneath your desk. Guards briskly walk in to haul the patient off.
|
||||||
|
Vladislav Orleg: [#scared] Wait, you're making a terrible mistake !
|
||||||
|
Vladislav Orleg: I am not sick, i swear !
|
||||||
|
|
||||||
|
=> END
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
~ psych_ward
|
||||||
|
|
||||||
|
You: My evaluation revealed no cause for concern. You will be transferred to the Psych Ward to receive proper treatment.
|
||||||
|
Vladislav Orleg: [#smiling] Thank you Doctor. Thank you so much.
|
||||||
|
|
||||||
=> END
|
=> END
|
||||||
@@ -0,0 +1,161 @@
|
|||||||
|
[gd_scene load_steps=11 format=3 uid="uid://22ca8midmqwo"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://Dialogues/balloon.gd" id="1_hghjc"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://mi5v1uq78g7o" path="res://Art/XanhMono-Italic.ttf" id="2_camm1"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://ckvgyvclnwggo" path="res://addons/dialogue_manager/dialogue_label.tscn" id="3_k7jp1"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://ckg5x0oonnjtn" path="res://Art/XanhMono-Regular.ttf" id="4_w3tww"]
|
||||||
|
[ext_resource type="Script" path="res://addons/dialogue_manager/dialogue_reponses_menu.gd" id="5_f5bwa"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_spyqn"]
|
||||||
|
bg_color = Color(0, 0, 0, 1)
|
||||||
|
border_width_left = 3
|
||||||
|
border_width_top = 3
|
||||||
|
border_width_right = 3
|
||||||
|
border_width_bottom = 3
|
||||||
|
border_color = Color(0.329412, 0.329412, 0.329412, 1)
|
||||||
|
corner_radius_top_left = 5
|
||||||
|
corner_radius_top_right = 5
|
||||||
|
corner_radius_bottom_right = 5
|
||||||
|
corner_radius_bottom_left = 5
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ri4m3"]
|
||||||
|
bg_color = Color(0.121569, 0.121569, 0.121569, 1)
|
||||||
|
border_width_left = 3
|
||||||
|
border_width_top = 3
|
||||||
|
border_width_right = 3
|
||||||
|
border_width_bottom = 3
|
||||||
|
border_color = Color(1, 1, 1, 1)
|
||||||
|
corner_radius_top_left = 5
|
||||||
|
corner_radius_top_right = 5
|
||||||
|
corner_radius_bottom_right = 5
|
||||||
|
corner_radius_bottom_left = 5
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_e0njw"]
|
||||||
|
bg_color = Color(0, 0, 0, 1)
|
||||||
|
border_width_left = 3
|
||||||
|
border_width_top = 3
|
||||||
|
border_width_right = 3
|
||||||
|
border_width_bottom = 3
|
||||||
|
border_color = Color(0.6, 0.6, 0.6, 1)
|
||||||
|
corner_radius_top_left = 5
|
||||||
|
corner_radius_top_right = 5
|
||||||
|
corner_radius_bottom_right = 5
|
||||||
|
corner_radius_bottom_left = 5
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_uy0d5"]
|
||||||
|
bg_color = Color(0, 0, 0, 1)
|
||||||
|
border_width_left = 3
|
||||||
|
border_width_top = 3
|
||||||
|
border_width_right = 3
|
||||||
|
border_width_bottom = 3
|
||||||
|
corner_radius_top_left = 5
|
||||||
|
corner_radius_top_right = 5
|
||||||
|
corner_radius_bottom_right = 5
|
||||||
|
corner_radius_bottom_left = 5
|
||||||
|
|
||||||
|
[sub_resource type="Theme" id="Theme_qq3yp"]
|
||||||
|
default_font_size = 20
|
||||||
|
Button/styles/disabled = SubResource("StyleBoxFlat_spyqn")
|
||||||
|
Button/styles/focus = SubResource("StyleBoxFlat_ri4m3")
|
||||||
|
Button/styles/hover = SubResource("StyleBoxFlat_e0njw")
|
||||||
|
Button/styles/normal = SubResource("StyleBoxFlat_e0njw")
|
||||||
|
MarginContainer/constants/margin_bottom = 15
|
||||||
|
MarginContainer/constants/margin_left = 30
|
||||||
|
MarginContainer/constants/margin_right = 30
|
||||||
|
MarginContainer/constants/margin_top = 15
|
||||||
|
Panel/styles/panel = SubResource("StyleBoxFlat_uy0d5")
|
||||||
|
|
||||||
|
[node name="ExampleBalloon" type="CanvasLayer"]
|
||||||
|
layer = 100
|
||||||
|
script = ExtResource("1_hghjc")
|
||||||
|
|
||||||
|
[node name="Balloon" type="Control" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 0
|
||||||
|
offset_top = 820.0
|
||||||
|
offset_right = 1270.0
|
||||||
|
offset_bottom = 1070.0
|
||||||
|
size_flags_horizontal = 0
|
||||||
|
size_flags_vertical = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
mouse_force_pass_scroll_events = false
|
||||||
|
theme = SubResource("Theme_qq3yp")
|
||||||
|
|
||||||
|
[node name="Panel" type="Panel" parent="Balloon"]
|
||||||
|
clip_children = 2
|
||||||
|
layout_mode = 1
|
||||||
|
offset_left = 10.0
|
||||||
|
offset_right = 1270.0
|
||||||
|
offset_bottom = 250.0
|
||||||
|
mouse_force_pass_scroll_events = false
|
||||||
|
|
||||||
|
[node name="Dialogue" type="MarginContainer" parent="Balloon/Panel"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
mouse_filter = 2
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="Balloon/Panel/Dialogue"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="CharacterLabel" type="RichTextLabel" parent="Balloon/Panel/Dialogue/VBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
modulate = Color(1, 1, 1, 0.501961)
|
||||||
|
layout_mode = 2
|
||||||
|
mouse_filter = 1
|
||||||
|
theme_override_fonts/normal_font = ExtResource("2_camm1")
|
||||||
|
theme_override_font_sizes/normal_font_size = 25
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "Character"
|
||||||
|
fit_content = true
|
||||||
|
scroll_active = false
|
||||||
|
|
||||||
|
[node name="DialogueLabel" parent="Balloon/Panel/Dialogue/VBoxContainer" instance=ExtResource("3_k7jp1")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
theme_override_fonts/normal_font = ExtResource("4_w3tww")
|
||||||
|
theme_override_fonts/mono_font = ExtResource("4_w3tww")
|
||||||
|
theme_override_fonts/italics_font = ExtResource("2_camm1")
|
||||||
|
theme_override_fonts/bold_italics_font = ExtResource("2_camm1")
|
||||||
|
theme_override_fonts/bold_font = ExtResource("4_w3tww")
|
||||||
|
theme_override_font_sizes/bold_italics_font_size = 30
|
||||||
|
theme_override_font_sizes/italics_font_size = 30
|
||||||
|
theme_override_font_sizes/mono_font_size = 30
|
||||||
|
theme_override_font_sizes/normal_font_size = 30
|
||||||
|
theme_override_font_sizes/bold_font_size = 30
|
||||||
|
text = "Dialogue..."
|
||||||
|
|
||||||
|
[node name="Responses" type="MarginContainer" parent="Balloon"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 7
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = -105.0
|
||||||
|
offset_top = -666.0
|
||||||
|
offset_right = 536.0
|
||||||
|
offset_bottom = -253.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 0
|
||||||
|
|
||||||
|
[node name="ResponsesMenu" type="VBoxContainer" parent="Balloon/Responses" node_paths=PackedStringArray("response_template")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 8
|
||||||
|
theme_override_constants/separation = 2
|
||||||
|
script = ExtResource("5_f5bwa")
|
||||||
|
response_template = NodePath("ResponseExample")
|
||||||
|
|
||||||
|
[node name="ResponseExample" type="Button" parent="Balloon/Responses/ResponsesMenu"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Response example"
|
||||||
|
|
||||||
|
[connection signal="gui_input" from="Balloon" to="." method="_on_balloon_gui_input"]
|
||||||
|
[connection signal="gui_input" from="Balloon/Panel" to="." method="_on_balloon_gui_input"]
|
||||||
|
[connection signal="response_selected" from="Balloon/Responses/ResponsesMenu" to="." method="_on_responses_menu_response_selected"]
|
||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
[ext_resource type="Script" path="res://main_hub.gd" id="1_rvfpd"]
|
[ext_resource type="Script" path="res://main_hub.gd" id="1_rvfpd"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cahspuhi43bx7" path="res://title_screen.tscn" id="2_3wmv1"]
|
[ext_resource type="PackedScene" uid="uid://cahspuhi43bx7" path="res://title_screen.tscn" id="2_3wmv1"]
|
||||||
[ext_resource type="PackedScene" uid="uid://chytk2cctjk3x" path="res://screening_desk.tscn" id="3_whctb"]
|
[ext_resource type="PackedScene" uid="uid://chytk2cctjk3x" path="res://screening_desk.tscn" id="3_whctb"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dcjhx2g4d056v" path="res://bedroom.tscn" id="4_4fm57"]
|
[ext_resource type="PackedScene" uid="uid://dcjhx2g4d056v" path="res://Bedroom.tscn" id="4_4fm57"]
|
||||||
[ext_resource type="PackedScene" uid="uid://igkl2384rxt1" path="res://text_screens.tscn" id="5_85o5j"]
|
[ext_resource type="PackedScene" uid="uid://igkl2384rxt1" path="res://text_screens.tscn" id="5_85o5j"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dixsxwodxuf0b" path="res://dialogue_screens.tscn" id="6_60wm2"]
|
[ext_resource type="PackedScene" uid="uid://dixsxwodxuf0b" path="res://dialogue_screens.tscn" id="6_60wm2"]
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://c0kyheol06kes"]
|
||||||
|
|
||||||
|
[ext_resource type="Theme" uid="uid://dn1n15xwt8ucv" path="res://Art/DialogTheme.tres" id="1_pvdac"]
|
||||||
|
|
||||||
|
[node name="ConfirmationDialog" type="ConfirmationDialog"]
|
||||||
|
initial_position = 1
|
||||||
|
size = Vector2i(300, 100)
|
||||||
|
theme = ExtResource("1_pvdac")
|
||||||
+3
-1
@@ -4,7 +4,9 @@ var is_transitioning = false
|
|||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
pass # Replace with function body.
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
|||||||
+17
-14
@@ -36,8 +36,6 @@ func _ready() -> void:
|
|||||||
|
|
||||||
#Showing TitleScreen
|
#Showing TitleScreen
|
||||||
title_screen.show()
|
title_screen.show()
|
||||||
#UI.show()
|
|
||||||
#UI.get_node("UI/SkipContainer").show()
|
|
||||||
|
|
||||||
#Connecting Signals
|
#Connecting Signals
|
||||||
title_screen.connect("new_game_pressed", _on_new_game_pressed)
|
title_screen.connect("new_game_pressed", _on_new_game_pressed)
|
||||||
@@ -55,33 +53,37 @@ func _process(delta: float) -> void:
|
|||||||
# Starts a new game
|
# Starts a new game
|
||||||
func _on_new_game_pressed():
|
func _on_new_game_pressed():
|
||||||
|
|
||||||
var choice_dialog = UI.get_node("UI/ConfirmationDialog")
|
#Offering to skip Introduction
|
||||||
|
UI.confirmation_text.text = "[center]Do you wish to skip the introduction ?[/center]"
|
||||||
choice_dialog.set_ok_button_text("Yes")
|
UI.confirmation_yes.pressed.connect(skip_intro, CONNECT_ONE_SHOT)
|
||||||
choice_dialog.set_cancel_button_text("No")
|
UI.confirmation_no.pressed.connect(play_intro, CONNECT_ONE_SHOT)
|
||||||
choice_dialog.get_label().text = ("Do you wish to skip the introduction ?")
|
UI.confirmation_dialog.show()
|
||||||
|
TransitionScreen.mask.visible = true
|
||||||
UI.get_node("UI/ConfirmationDialog").show()
|
|
||||||
|
|
||||||
choice_dialog.get_ok_button().pressed.connect(skip_intro, CONNECT_ONE_SHOT)
|
|
||||||
choice_dialog.get_cancel_button().pressed.connect(play_intro, CONNECT_ONE_SHOT)
|
|
||||||
|
|
||||||
|
|
||||||
#Skips the introduction
|
#Skips the introduction
|
||||||
func skip_intro():
|
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")])
|
TransitionScreen.transition("big", [$TitleScreen], [$ScreeningDesk, UI, UI.get_node("UI/UpperContainer")])
|
||||||
await TransitionScreen.transition_finished
|
await TransitionScreen.transition_finished
|
||||||
|
|
||||||
|
#Launching the gameplay loop
|
||||||
$ScreeningDesk.gameplay_loop("564")
|
$ScreeningDesk.gameplay_loop("564")
|
||||||
|
|
||||||
|
|
||||||
#Plays the entire introduction
|
#Plays the entire introduction
|
||||||
func play_intro():
|
func play_intro():
|
||||||
|
|
||||||
|
#Disconnecting the other Signal from the Confirmation Dialogue
|
||||||
|
UI.confirmation_yes.disconnect("pressed", skip_intro)
|
||||||
|
|
||||||
|
#Introduction First slides
|
||||||
var text_container = $TextScreens/MarginContainer/IntroBoxContainer/TextContainer
|
var text_container = $TextScreens/MarginContainer/IntroBoxContainer/TextContainer
|
||||||
|
|
||||||
#Introduction first slides
|
|
||||||
TransitionScreen.transition("big", [$TitleScreen], [$TextScreens, text_container.get_child(0), UI, UI.get_node("UI/SkipContainer")])
|
TransitionScreen.transition("big", [$TitleScreen], [$TextScreens, text_container.get_child(0), UI, UI.get_node("UI/SkipContainer")])
|
||||||
await UI.next_slide
|
await UI.next_slide
|
||||||
|
|
||||||
@@ -96,10 +98,11 @@ func play_intro():
|
|||||||
DialogueManager.show_dialogue_balloon(dialogue_intro, "start")
|
DialogueManager.show_dialogue_balloon(dialogue_intro, "start")
|
||||||
await DialogueManager.dialogue_ended
|
await DialogueManager.dialogue_ended
|
||||||
|
|
||||||
#Transition to the Screening Desk
|
#Transitioning to the Screening Desk
|
||||||
TransitionScreen.transition("big", [$DialogueScreens], [$ScreeningDesk, UI, UI.get_node("UI/UpperContainer")])
|
TransitionScreen.transition("big", [$DialogueScreens], [$ScreeningDesk, UI, UI.get_node("UI/UpperContainer")])
|
||||||
await TransitionScreen.transition_finished
|
await TransitionScreen.transition_finished
|
||||||
|
|
||||||
|
#Launching the gameplay loop
|
||||||
$ScreeningDesk.gameplay_loop("564")
|
$ScreeningDesk.gameplay_loop("564")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -18,8 +18,8 @@ config/features=PackedStringArray("4.3", "Forward Plus")
|
|||||||
|
|
||||||
TransitionScreen="*res://transition_screen.tscn"
|
TransitionScreen="*res://transition_screen.tscn"
|
||||||
DialogueManager="*res://addons/dialogue_manager/dialogue_manager.gd"
|
DialogueManager="*res://addons/dialogue_manager/dialogue_manager.gd"
|
||||||
Globals="*res://globals.gd"
|
|
||||||
UI="*res://ui.tscn"
|
UI="*res://ui.tscn"
|
||||||
|
Globals="*res://globals.gd"
|
||||||
CurrentPatient="*res://current_patient.gd"
|
CurrentPatient="*res://current_patient.gd"
|
||||||
|
|
||||||
[dialogue_manager]
|
[dialogue_manager]
|
||||||
|
|||||||
+131
-50
@@ -4,6 +4,8 @@ extends Control
|
|||||||
@onready var margin_container = $Background/HBoxContainer/MarginContainer/VBoxContainer/FaceMarginContainer/PanelContainer/MarginContainer
|
@onready var margin_container = $Background/HBoxContainer/MarginContainer/VBoxContainer/FaceMarginContainer/PanelContainer/MarginContainer
|
||||||
@onready var patient_file = $Background/HBoxContainer/MarginContainer/VBoxContainer/FaceMarginContainer/PanelContainer/MarginContainer/FileContainer/PatientFile
|
@onready var patient_file = $Background/HBoxContainer/MarginContainer/VBoxContainer/FaceMarginContainer/PanelContainer/MarginContainer/FileContainer/PatientFile
|
||||||
@onready var patient_file_title = $Background/HBoxContainer/MarginContainer/VBoxContainer/FaceMarginContainer/PanelContainer/MarginContainer/FileContainer/HBoxContainer/PatientFileTitle
|
@onready var patient_file_title = $Background/HBoxContainer/MarginContainer/VBoxContainer/FaceMarginContainer/PanelContainer/MarginContainer/FileContainer/HBoxContainer/PatientFileTitle
|
||||||
|
@onready var patient_recording = $Background/HBoxContainer/MarginContainer/VBoxContainer/FaceMarginContainer/PanelContainer/MarginContainer/RecordingContainer/Recording
|
||||||
|
@onready var patient_recording_title = $Background/HBoxContainer/MarginContainer/VBoxContainer/FaceMarginContainer/PanelContainer/MarginContainer/RecordingContainer/HBoxContainer/RecordTitle
|
||||||
@onready var face_zoom = $Background/HBoxContainer/MarginContainer/VBoxContainer/FaceMarginContainer/FaceZoom
|
@onready var face_zoom = $Background/HBoxContainer/MarginContainer/VBoxContainer/FaceMarginContainer/FaceZoom
|
||||||
@onready var alone_controls = $Background/HBoxContainer/MarginContainer/VBoxContainer/ControlsMarginContainer/Alone
|
@onready var alone_controls = $Background/HBoxContainer/MarginContainer/VBoxContainer/ControlsMarginContainer/Alone
|
||||||
@onready var patient_controls = $Background/HBoxContainer/MarginContainer/VBoxContainer/ControlsMarginContainer/Patient
|
@onready var patient_controls = $Background/HBoxContainer/MarginContainer/VBoxContainer/ControlsMarginContainer/Patient
|
||||||
@@ -18,26 +20,14 @@ func _ready() -> void:
|
|||||||
|
|
||||||
#Connecting signals
|
#Connecting signals
|
||||||
alone_controls.get_node("PatientFile").pressed.connect(self._patient_file)
|
alone_controls.get_node("PatientFile").pressed.connect(self._patient_file)
|
||||||
patient_controls.get_node("PatientFile").pressed.connect(self._patient_file)
|
|
||||||
|
|
||||||
alone_controls.get_node("Guidebook").pressed.connect(self._guidebook)
|
alone_controls.get_node("Guidebook").pressed.connect(self._guidebook)
|
||||||
patient_controls.get_node("Guidebook").pressed.connect(self._guidebook)
|
|
||||||
|
|
||||||
alone_controls.get_node("CallNextPatient").pressed.connect(self._call_next_patient)
|
alone_controls.get_node("CallNextPatient").pressed.connect(self._call_next_patient)
|
||||||
|
|
||||||
|
patient_controls.get_node("PatientFile").pressed.connect(self._patient_file)
|
||||||
|
patient_controls.get_node("Guidebook").pressed.connect(self._guidebook)
|
||||||
patient_controls.get_node("PatientRecording").pressed.connect(self._patient_recording)
|
patient_controls.get_node("PatientRecording").pressed.connect(self._patient_recording)
|
||||||
|
|
||||||
patient_controls.get_node("Examine").pressed.connect(self._examine)
|
patient_controls.get_node("Examine").pressed.connect(self._examine)
|
||||||
|
|
||||||
#Instantiating a custom balloon
|
|
||||||
var Balloon: Resource = preload("res://Dialogues/balloon.tscn")
|
|
||||||
balloon = Balloon.instantiate()
|
|
||||||
var panel = balloon.get_node("Balloon/Panel")
|
|
||||||
|
|
||||||
get_tree().current_scene.add_child(balloon)
|
|
||||||
balloon.name = "Balloon"
|
|
||||||
panel.size = Vector2(1260, 250)
|
|
||||||
|
|
||||||
#Hiding everything
|
#Hiding everything
|
||||||
self.hide()
|
self.hide()
|
||||||
for node in margin_container.get_children():
|
for node in margin_container.get_children():
|
||||||
@@ -57,46 +47,43 @@ func gameplay_loop(patient_id):
|
|||||||
|
|
||||||
func new_patient(patient_id):
|
func new_patient(patient_id):
|
||||||
|
|
||||||
|
#Connecting Signals
|
||||||
|
patient_controls.get_node("Containment").pressed.connect(self._on_containment_pressed)
|
||||||
|
patient_controls.get_node("PsychWard").pressed.connect(self._on_psych_ward_pressed)
|
||||||
|
|
||||||
#Loading Patient Files
|
#Loading Patient Files
|
||||||
var file_path: String = "res://Dialogues/Patients/patient_" + String(patient_id) + "_file.txt"
|
var file_path: String = "res://Dialogues/Patients/patient_" + patient_id + "_file.txt"
|
||||||
print(file_path)
|
|
||||||
var file = FileAccess.open(file_path, FileAccess.READ)
|
var file = FileAccess.open(file_path, FileAccess.READ)
|
||||||
var file_content = file.get_as_text()
|
var file_content = file.get_as_text()
|
||||||
|
|
||||||
patient_file.text = file_content
|
patient_file.text = file_content
|
||||||
patient_file_title.text = "
|
patient_file_title.text = "\nPATIENT FILE #" + patient_id
|
||||||
PATIENT FILE #" + String(patient_id)
|
|
||||||
|
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
|
#Loading Patient Recording
|
||||||
|
patient_recording.text = ""
|
||||||
|
patient_recording_title.text = "\nPATIENT RECORDING #" + patient_id
|
||||||
|
|
||||||
#Loading Patient Texture
|
#Loading Patient Texture
|
||||||
file_path = "res://Art/Patients/patient_" + String(patient_id) + "/patient_" + String(patient_id) + "_full.png"
|
file_path = "res://Art/Patients/patient_" + patient_id + "/patient_" + patient_id + "_full.png"
|
||||||
patient_texture.texture = load(file_path)
|
patient_texture.texture = load(file_path)
|
||||||
|
|
||||||
#Loading Face Emotions
|
#Loading Face Emotions
|
||||||
var face: Resource
|
var face: Resource
|
||||||
var emotion: Dictionary
|
var emotion_branch: Dictionary
|
||||||
|
|
||||||
#Neutral
|
for emotion in ["neutral", "smiling", "angry", "scared", "sad"]:
|
||||||
file_path = "res://Art/Patients/patient_" + String(patient_id) + "/patient_" + String(patient_id) + "_neutral.png"
|
file_path = "res://Art/Patients/patient_" + patient_id + "/patient_" + patient_id + "_" + emotion + ".png"
|
||||||
face = load(file_path)
|
face = load(file_path)
|
||||||
emotion = {"neutral": face}
|
if face != null:
|
||||||
patient_emotions.merge(emotion)
|
emotion_branch = {emotion: face}
|
||||||
|
patient_emotions.merge(emotion_branch)
|
||||||
#Smiling
|
|
||||||
file_path = "res://Art/Patients/patient_" + String(patient_id) + "/patient_" + String(patient_id) + "_smiling.png"
|
|
||||||
face = load(file_path)
|
|
||||||
emotion = {"smiling": face}
|
|
||||||
patient_emotions.merge(emotion)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Loading Default Face
|
#Loading Default Face
|
||||||
face = patient_emotions["neutral"]
|
face_zoom.texture = patient_emotions["neutral"]
|
||||||
face_zoom.texture = face
|
|
||||||
|
|
||||||
#Loading Dialogue Resource
|
#Loading Dialogue Resource
|
||||||
var dialogue_resource_path = "res://Dialogues/Patients/patient_" + String(patient_id) + ".dialogue"
|
var dialogue_resource_path = "res://Dialogues/Patients/patient_" + patient_id + ".dialogue"
|
||||||
dialogue_resource = load(dialogue_resource_path)
|
dialogue_resource = load(dialogue_resource_path)
|
||||||
|
|
||||||
|
|
||||||
@@ -124,20 +111,13 @@ func _guidebook():
|
|||||||
func _call_next_patient():
|
func _call_next_patient():
|
||||||
|
|
||||||
#Hiding and Showing appropriate scenes
|
#Hiding and Showing appropriate scenes
|
||||||
|
var scenes_to_hide = [alone_controls, panel_container] + margin_container.get_children()
|
||||||
#alone_controls.hide()
|
var scenes_to_show = [patient_controls,patient_texture,face_zoom]
|
||||||
#patient_controls.show()
|
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)
|
||||||
#patient_texture.show()
|
|
||||||
#_examine()
|
|
||||||
|
|
||||||
var scenes_to_hide = margin_container.get_children()
|
|
||||||
scenes_to_hide.append_array([alone_controls,panel_container])
|
|
||||||
TransitionScreen.transition("big", scenes_to_hide, [patient_controls,patient_texture,face_zoom])
|
|
||||||
await TransitionScreen.transition_finished
|
await TransitionScreen.transition_finished
|
||||||
|
|
||||||
#Starting Dialogue
|
#Starting Dialogue
|
||||||
DialogueManager.got_dialogue.connect(_change_emotion)
|
start_balloon("start")
|
||||||
balloon.start(dialogue_resource, "start")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -151,6 +131,26 @@ func _patient_recording():
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func _recording_text(dialogue_line):
|
||||||
|
|
||||||
|
var line = dialogue_line.text
|
||||||
|
var character = dialogue_line.character
|
||||||
|
var character_colour : String
|
||||||
|
|
||||||
|
patient_recording.append_text("\n\n")
|
||||||
|
|
||||||
|
#Adjusting Character Colour
|
||||||
|
if character != "":
|
||||||
|
if character == "You":
|
||||||
|
character_colour = "[color=darkgreen]"
|
||||||
|
else :
|
||||||
|
character_colour = "[color=darkred]"
|
||||||
|
patient_recording.append_text(character_colour + character + "[/color]\n")
|
||||||
|
|
||||||
|
patient_recording.append_text(line)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _examine():
|
func _examine():
|
||||||
|
|
||||||
for node in margin_container.get_children():
|
for node in margin_container.get_children():
|
||||||
@@ -163,17 +163,98 @@ func _examine():
|
|||||||
func _change_emotion(dialogue_line) -> void:
|
func _change_emotion(dialogue_line) -> void:
|
||||||
|
|
||||||
var line_tag = dialogue_line.tags
|
var line_tag = dialogue_line.tags
|
||||||
var new_emotion
|
|
||||||
|
|
||||||
if line_tag.is_empty() == false:
|
if line_tag.is_empty() == false:
|
||||||
new_emotion = line_tag[0]
|
var new_emotion = line_tag[0]
|
||||||
print("Emotion changed to ", new_emotion)
|
print("Emotion changed to ", new_emotion)
|
||||||
face_zoom.texture = patient_emotions[new_emotion]
|
face_zoom.texture = patient_emotions[new_emotion]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func _on_containment_pressed():
|
||||||
|
|
||||||
|
#Asking for Confirmation
|
||||||
|
UI.confirmation_text.text = "[center]Do you really want to send this patient to [color=darkred]Containment[/color] ?[/center]"
|
||||||
|
UI.confirmation_yes.pressed.connect(send_to_containment, CONNECT_ONE_SHOT)
|
||||||
|
UI.confirmation_no.pressed.connect(func(): UI.confirmation_yes.disconnect("pressed", send_to_containment))
|
||||||
|
UI.confirmation_dialog.show()
|
||||||
|
TransitionScreen.mask.visible = true
|
||||||
|
|
||||||
|
|
||||||
|
func _on_psych_ward_pressed():
|
||||||
|
|
||||||
|
#Asking for Confirmation
|
||||||
|
UI.confirmation_text.text = "[center]Do you really want to send this patient to the [color=darkgreen]Psych Ward[/color] ?[/center]"
|
||||||
|
UI.confirmation_yes.pressed.connect(send_to_psych_ward, CONNECT_ONE_SHOT)
|
||||||
|
UI.confirmation_no.pressed.connect(func(): UI.confirmation_yes.disconnect("pressed", send_to_psych_ward))
|
||||||
|
UI.confirmation_dialog.show()
|
||||||
|
TransitionScreen.mask.visible = true
|
||||||
|
|
||||||
|
|
||||||
|
func send_to_containment():
|
||||||
|
|
||||||
|
#Disconnecting signals
|
||||||
|
var containment_node = patient_controls.get_node("Containment")
|
||||||
|
var psych_ward_node = patient_controls.get_node("PsychWard")
|
||||||
|
if containment_node.is_connected("pressed", _on_containment_pressed):
|
||||||
|
containment_node.disconnect("pressed", _on_containment_pressed)
|
||||||
|
if psych_ward_node.is_connected("pressed", _on_psych_ward_pressed):
|
||||||
|
psych_ward_node.disconnect("pressed", _on_psych_ward_pressed)
|
||||||
|
|
||||||
|
start_balloon("containment")
|
||||||
|
await DialogueManager.dialogue_ended
|
||||||
|
clear_patient()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func send_to_psych_ward():
|
||||||
|
|
||||||
|
#Disconnecting signals to prevent changing choice
|
||||||
|
var containment_node = patient_controls.get_node("Containment")
|
||||||
|
var psych_ward_node = patient_controls.get_node("PsychWard")
|
||||||
|
if containment_node.is_connected("pressed", _on_containment_pressed):
|
||||||
|
containment_node.disconnect("pressed", _on_containment_pressed)
|
||||||
|
if psych_ward_node.is_connected("pressed", _on_psych_ward_pressed):
|
||||||
|
psych_ward_node.disconnect("pressed", _on_psych_ward_pressed)
|
||||||
|
|
||||||
|
start_balloon("psych_ward")
|
||||||
|
await DialogueManager.dialogue_ended
|
||||||
|
clear_patient()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func start_balloon(start_title: String):
|
||||||
|
|
||||||
|
#Freeing Previous Balloon and Disconnecting DialogueManager signals
|
||||||
|
if is_instance_valid(balloon):
|
||||||
|
balloon.queue_free()
|
||||||
|
if DialogueManager.is_connected("got_dialogue", _change_emotion):
|
||||||
|
DialogueManager.disconnect("got_dialogue", _change_emotion)
|
||||||
|
if DialogueManager.is_connected("got_dialogue", _recording_text):
|
||||||
|
DialogueManager.disconnect("got_dialogue", _recording_text)
|
||||||
|
|
||||||
|
#Instantiating a custom balloon
|
||||||
|
var Balloon: Resource = load("res://Dialogues/balloon_small.tscn")
|
||||||
|
balloon = Balloon.instantiate()
|
||||||
|
get_tree().current_scene.add_child(balloon)
|
||||||
|
|
||||||
|
#Starting Dialogue and connecting DialogueManager signals
|
||||||
|
DialogueManager.got_dialogue.connect(_change_emotion)
|
||||||
|
DialogueManager.got_dialogue.connect(_recording_text)
|
||||||
|
balloon.start(dialogue_resource, start_title)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func clear_patient():
|
||||||
|
|
||||||
|
#Hiding and Showing appropriate scenes
|
||||||
|
var scenes_to_hide = [patient_controls, patient_texture, face_zoom] + margin_container.get_children()
|
||||||
|
var scenes_to_show = [alone_controls, panel_container]
|
||||||
|
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)
|
||||||
|
await TransitionScreen.transition_finished
|
||||||
|
new_patient("564")
|
||||||
|
|
||||||
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
-3
@@ -20,6 +20,7 @@ anchor_right = 1.0
|
|||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
mouse_filter = 2
|
||||||
script = ExtResource("1_1s7k3")
|
script = ExtResource("1_1s7k3")
|
||||||
|
|
||||||
[node name="Background" type="VBoxContainer" parent="."]
|
[node name="Background" type="VBoxContainer" parent="."]
|
||||||
@@ -29,6 +30,7 @@ anchor_right = 1.0
|
|||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
mouse_filter = 2
|
||||||
theme_override_constants/separation = 0
|
theme_override_constants/separation = 0
|
||||||
|
|
||||||
[node name="UpperBorder" type="TextureRect" parent="Background"]
|
[node name="UpperBorder" type="TextureRect" parent="Background"]
|
||||||
@@ -42,6 +44,7 @@ expand_mode = 1
|
|||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
size_flags_stretch_ratio = 1.5
|
size_flags_stretch_ratio = 1.5
|
||||||
|
mouse_filter = 2
|
||||||
theme_override_constants/separation = 0
|
theme_override_constants/separation = 0
|
||||||
|
|
||||||
[node name="Desk" type="TextureRect" parent="Background/HBoxContainer"]
|
[node name="Desk" type="TextureRect" parent="Background/HBoxContainer"]
|
||||||
@@ -49,6 +52,7 @@ layout_mode = 2
|
|||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
size_flags_stretch_ratio = 2.0
|
size_flags_stretch_ratio = 2.0
|
||||||
|
mouse_filter = 2
|
||||||
texture = ExtResource("3_xhvwd")
|
texture = ExtResource("3_xhvwd")
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
|
|
||||||
@@ -183,8 +187,6 @@ size_flags_stretch_ratio = 1.4
|
|||||||
theme_override_fonts/normal_font = ExtResource("4_uvrsh")
|
theme_override_fonts/normal_font = ExtResource("4_uvrsh")
|
||||||
theme_override_font_sizes/normal_font_size = 20
|
theme_override_font_sizes/normal_font_size = 20
|
||||||
bbcode_enabled = true
|
bbcode_enabled = true
|
||||||
text = "
|
|
||||||
PATIENT RECORDING #564"
|
|
||||||
|
|
||||||
[node name="Control2" type="Control" parent="Background/HBoxContainer/MarginContainer/VBoxContainer/FaceMarginContainer/PanelContainer/MarginContainer/RecordingContainer/HBoxContainer"]
|
[node name="Control2" type="Control" parent="Background/HBoxContainer/MarginContainer/VBoxContainer/FaceMarginContainer/PanelContainer/MarginContainer/RecordingContainer/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -197,7 +199,6 @@ size_flags_stretch_ratio = 6.0
|
|||||||
theme_override_fonts/normal_font = ExtResource("4_uvrsh")
|
theme_override_fonts/normal_font = ExtResource("4_uvrsh")
|
||||||
theme_override_font_sizes/normal_font_size = 20
|
theme_override_font_sizes/normal_font_size = 20
|
||||||
bbcode_enabled = true
|
bbcode_enabled = true
|
||||||
text = "RECORDING"
|
|
||||||
|
|
||||||
[node name="FaceZoom" type="TextureRect" parent="Background/HBoxContainer/MarginContainer/VBoxContainer/FaceMarginContainer"]
|
[node name="FaceZoom" type="TextureRect" parent="Background/HBoxContainer/MarginContainer/VBoxContainer/FaceMarginContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|||||||
+3
-4
@@ -1,12 +1,11 @@
|
|||||||
extends Control
|
extends CanvasLayer
|
||||||
|
|
||||||
signal new_game_pressed
|
signal new_game_pressed
|
||||||
signal quit_game
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
self.get_node("MenuContainer/NewGame").pressed.connect(_on_new_game_pressed)
|
self.get_node("TitleScreen/MenuContainer/NewGame").pressed.connect(_on_new_game_pressed)
|
||||||
self.get_node("MenuContainer/QuitGame").pressed.connect(_on_quit_game_pressed)
|
self.get_node("TitleScreen/MenuContainer/QuitGame").pressed.connect(_on_quit_game_pressed)
|
||||||
self.hide()
|
self.hide()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
+28
-17
@@ -2,19 +2,20 @@
|
|||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://c3je4gir1qlot" path="res://Art/BlackScreen.png" id="1_3k8ub"]
|
[ext_resource type="Texture2D" uid="uid://c3je4gir1qlot" path="res://Art/BlackScreen.png" id="1_3k8ub"]
|
||||||
[ext_resource type="Script" path="res://title_screen.gd" id="1_ejdst"]
|
[ext_resource type="Script" path="res://title_screen.gd" id="1_ejdst"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://ckg5x0oonnjtn" path="res://Art/XanhMono-Regular.ttf" id="3_xwylp"]
|
||||||
|
|
||||||
[sub_resource type="FontVariation" id="FontVariation_o5qo5"]
|
[node name="TitleScreenLayer" type="CanvasLayer"]
|
||||||
|
script = ExtResource("1_ejdst")
|
||||||
|
|
||||||
[node name="TitleScreen" type="Control"]
|
[node name="TitleScreen" type="Control" parent="."]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
script = ExtResource("1_ejdst")
|
|
||||||
|
|
||||||
[node name="Background" type="TextureRect" parent="."]
|
[node name="Background" type="TextureRect" parent="TitleScreen"]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
@@ -23,47 +24,57 @@ grow_horizontal = 2
|
|||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
texture = ExtResource("1_3k8ub")
|
texture = ExtResource("1_3k8ub")
|
||||||
|
|
||||||
[node name="MenuContainer" type="VBoxContainer" parent="."]
|
[node name="MenuContainer" type="VBoxContainer" parent="TitleScreen"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
offset_left = 156.0
|
offset_left = 200.0
|
||||||
offset_top = 284.0
|
offset_top = 370.0
|
||||||
offset_right = 432.0
|
offset_right = 506.0
|
||||||
offset_bottom = 612.0
|
offset_bottom = 854.0
|
||||||
metadata/_edit_group_ = true
|
metadata/_edit_group_ = true
|
||||||
|
|
||||||
[node name="NewGame" type="Button" parent="MenuContainer"]
|
[node name="NewGame" type="Button" parent="TitleScreen/MenuContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
theme_override_fonts/font = ExtResource("3_xwylp")
|
||||||
|
theme_override_font_sizes/font_size = 30
|
||||||
text = "NEW GAME"
|
text = "NEW GAME"
|
||||||
|
|
||||||
[node name="Save" type="Button" parent="MenuContainer"]
|
[node name="Save" type="Button" parent="TitleScreen/MenuContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
theme_override_fonts/font = ExtResource("3_xwylp")
|
||||||
|
theme_override_font_sizes/font_size = 30
|
||||||
text = "SAVE"
|
text = "SAVE"
|
||||||
|
|
||||||
[node name="Load" type="Button" parent="MenuContainer"]
|
[node name="Load" type="Button" parent="TitleScreen/MenuContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
theme_override_fonts/font = ExtResource("3_xwylp")
|
||||||
|
theme_override_font_sizes/font_size = 30
|
||||||
text = "LOAD"
|
text = "LOAD"
|
||||||
|
|
||||||
[node name="Settings" type="Button" parent="MenuContainer"]
|
[node name="Settings" type="Button" parent="TitleScreen/MenuContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
theme_override_fonts/font = ExtResource("3_xwylp")
|
||||||
|
theme_override_font_sizes/font_size = 30
|
||||||
text = "SETTINGS"
|
text = "SETTINGS"
|
||||||
|
|
||||||
[node name="QuitGame" type="Button" parent="MenuContainer"]
|
[node name="QuitGame" type="Button" parent="TitleScreen/MenuContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
theme_override_fonts/font = ExtResource("3_xwylp")
|
||||||
|
theme_override_font_sizes/font_size = 30
|
||||||
text = "QUIT GAME"
|
text = "QUIT GAME"
|
||||||
|
|
||||||
[node name="GameTitle" type="Label" parent="."]
|
[node name="GameTitle" type="Label" parent="TitleScreen"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 68.0
|
offset_left = 68.0
|
||||||
offset_top = 85.0
|
offset_top = 85.0
|
||||||
offset_right = 501.0
|
offset_right = 642.0
|
||||||
offset_bottom = 241.0
|
offset_bottom = 241.0
|
||||||
theme_type_variation = &"HeaderLarge"
|
theme_type_variation = &"HeaderLarge"
|
||||||
theme_override_fonts/font = SubResource("FontVariation_o5qo5")
|
theme_override_fonts/font = ExtResource("3_xwylp")
|
||||||
theme_override_font_sizes/font_size = 71
|
theme_override_font_sizes/font_size = 71
|
||||||
text = "I am not sick"
|
text = "I am not sick"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|||||||
@@ -7,12 +7,14 @@ signal transition_finished
|
|||||||
@onready var small_fading = $SmallFading
|
@onready var small_fading = $SmallFading
|
||||||
@onready var big_animation = $BigFading/BigFadingAnimation
|
@onready var big_animation = $BigFading/BigFadingAnimation
|
||||||
@onready var small_animation = $SmallFading/SmallFadingAnimation
|
@onready var small_animation = $SmallFading/SmallFadingAnimation
|
||||||
|
@onready var mask = $Mask
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
|
||||||
big_fading.visible = false
|
big_fading.visible = false
|
||||||
small_fading.visible = false
|
small_fading.visible = false
|
||||||
|
mask.visible = false
|
||||||
big_animation.connect("animation_finished", _on_animation_finished)
|
big_animation.connect("animation_finished", _on_animation_finished)
|
||||||
small_animation.connect("animation_finished", _on_animation_finished)
|
small_animation.connect("animation_finished", _on_animation_finished)
|
||||||
|
|
||||||
|
|||||||
+10
-1
@@ -111,7 +111,7 @@ _data = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[node name="transition_screen" type="CanvasLayer"]
|
[node name="transition_screen" type="CanvasLayer"]
|
||||||
layer = 10
|
layer = 110
|
||||||
script = ExtResource("1_hbjtk")
|
script = ExtResource("1_hbjtk")
|
||||||
|
|
||||||
[node name="BigFading" type="ColorRect" parent="."]
|
[node name="BigFading" type="ColorRect" parent="."]
|
||||||
@@ -139,3 +139,12 @@ color = Color(0, 0, 0, 1)
|
|||||||
libraries = {
|
libraries = {
|
||||||
"": SubResource("AnimationLibrary_h2xbl")
|
"": SubResource("AnimationLibrary_h2xbl")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[node name="Mask" type="ColorRect" parent="."]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
mouse_force_pass_scroll_events = false
|
||||||
|
color = Color(0, 0, 0, 0.470588)
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
extends CanvasLayer
|
extends CanvasLayer
|
||||||
|
|
||||||
@onready var next = $UI/SkipContainer/NextButton
|
@onready var next = $UI/SkipContainer/NextButton
|
||||||
|
@onready var confirmation_dialog = $UI/PanelContainer
|
||||||
|
@onready var confirmation_text = $UI/PanelContainer/MarginContainer/VBoxContainer/ConfirmationText
|
||||||
|
@onready var confirmation_yes = $UI/PanelContainer/MarginContainer/VBoxContainer/MarginContainer/HBoxContainer/YesButton
|
||||||
|
@onready var confirmation_no = $UI/PanelContainer/MarginContainer/VBoxContainer/MarginContainer/HBoxContainer/NoButton
|
||||||
|
|
||||||
signal next_request
|
signal next_request
|
||||||
signal next_slide
|
signal next_slide
|
||||||
@@ -8,11 +12,21 @@ signal next_slide
|
|||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
|
||||||
|
#Connecting signals
|
||||||
next.pressed.connect(_on_next_pressed)
|
next.pressed.connect(_on_next_pressed)
|
||||||
self.connect("next_request", _on_next_request)
|
self.connect("next_request", _on_next_request)
|
||||||
|
|
||||||
|
#Setting up the Confirmation Dialog
|
||||||
|
confirmation_yes.text = ("YES")
|
||||||
|
confirmation_no.text = ("NO")
|
||||||
|
UI.confirmation_yes.pressed.connect(func(): UI.confirmation_dialog.hide())
|
||||||
|
UI.confirmation_yes.pressed.connect(func(): TransitionScreen.mask.visible = false)
|
||||||
|
UI.confirmation_no.pressed.connect(func(): UI.confirmation_dialog.hide())
|
||||||
|
UI.confirmation_no.pressed.connect(func(): TransitionScreen.mask.visible = false)
|
||||||
|
|
||||||
#Hiding everything at start
|
#Hiding everything at start
|
||||||
self.hide()
|
#self.hide()
|
||||||
|
confirmation_dialog.hide()
|
||||||
self.get_node("UI/UpperContainer").hide()
|
self.get_node("UI/UpperContainer").hide()
|
||||||
self.get_node("UI/SkipContainer").hide()
|
self.get_node("UI/SkipContainer").hide()
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,16 @@
|
|||||||
[ext_resource type="Script" path="res://ui.gd" id="1_mg12k"]
|
[ext_resource type="Script" path="res://ui.gd" id="1_mg12k"]
|
||||||
[ext_resource type="FontFile" uid="uid://ckg5x0oonnjtn" path="res://Art/XanhMono-Regular.ttf" id="2_cohu5"]
|
[ext_resource type="FontFile" uid="uid://ckg5x0oonnjtn" path="res://Art/XanhMono-Regular.ttf" id="2_cohu5"]
|
||||||
[ext_resource type="FontFile" uid="uid://mi5v1uq78g7o" path="res://Art/XanhMono-Italic.ttf" id="3_e3v1e"]
|
[ext_resource type="FontFile" uid="uid://mi5v1uq78g7o" path="res://Art/XanhMono-Italic.ttf" id="3_e3v1e"]
|
||||||
[ext_resource type="Theme" uid="uid://dn1n15xwt8ucv" path="res://Art/DialogTheme.tres" id="4_ib3m7"]
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0joc6"]
|
||||||
|
border_width_left = 2
|
||||||
|
border_width_top = 2
|
||||||
|
border_width_right = 2
|
||||||
|
border_width_bottom = 2
|
||||||
|
border_color = Color(0.629675, 0.629675, 0.629674, 1)
|
||||||
|
|
||||||
[node name="UILayer" type="CanvasLayer"]
|
[node name="UILayer" type="CanvasLayer"]
|
||||||
layer = 7
|
layer = 128
|
||||||
script = ExtResource("1_mg12k")
|
script = ExtResource("1_mg12k")
|
||||||
|
|
||||||
[node name="UI" type="Control" parent="."]
|
[node name="UI" type="Control" parent="."]
|
||||||
@@ -19,12 +25,66 @@ grow_horizontal = 2
|
|||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
|
|
||||||
[node name="ConfirmationDialog" type="ConfirmationDialog" parent="UI"]
|
[node name="PanelContainer" type="PanelContainer" parent="UI"]
|
||||||
initial_position = 1
|
layout_mode = 1
|
||||||
size = Vector2i(300, 118)
|
anchors_preset = 8
|
||||||
theme = ExtResource("4_ib3m7")
|
anchor_left = 0.5
|
||||||
ok_button_text = "Yes"
|
anchor_top = 0.5
|
||||||
cancel_button_text = "No"
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -200.0
|
||||||
|
offset_top = -75.0
|
||||||
|
offset_right = 300.0
|
||||||
|
offset_bottom = 85.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_0joc6")
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="UI/PanelContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="UI/PanelContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/margin_left = 10
|
||||||
|
theme_override_constants/margin_top = 20
|
||||||
|
theme_override_constants/margin_right = 10
|
||||||
|
theme_override_constants/margin_bottom = 10
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="UI/PanelContainer/MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ConfirmationText" type="RichTextLabel" parent="UI/PanelContainer/MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
size_flags_stretch_ratio = 3.0
|
||||||
|
theme_override_fonts/normal_font = ExtResource("2_cohu5")
|
||||||
|
theme_override_font_sizes/normal_font_size = 25
|
||||||
|
bbcode_enabled = true
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="UI/PanelContainer/MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
theme_override_constants/margin_left = 70
|
||||||
|
theme_override_constants/margin_right = 70
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="UI/PanelContainer/MarginContainer/VBoxContainer/MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 70
|
||||||
|
|
||||||
|
[node name="YesButton" type="Button" parent="UI/PanelContainer/MarginContainer/VBoxContainer/MarginContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||||
|
theme_override_font_sizes/font_size = 20
|
||||||
|
text = "YES"
|
||||||
|
|
||||||
|
[node name="NoButton" type="Button" parent="UI/PanelContainer/MarginContainer/VBoxContainer/MarginContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
theme_override_fonts/font = ExtResource("2_cohu5")
|
||||||
|
theme_override_font_sizes/font_size = 20
|
||||||
|
text = "NO"
|
||||||
|
|
||||||
[node name="UpperContainer" type="HBoxContainer" parent="UI"]
|
[node name="UpperContainer" type="HBoxContainer" parent="UI"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user