Début du dialogue_screens
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bchkgrmeeryiq"
|
||||
path="res://.godot/imported/MeetingRoom.png-77aa22d9067935e9f7ec3b696606ea96.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Art/MeetingRoom.png"
|
||||
dest_files=["res://.godot/imported/MeetingRoom.png-77aa22d9067935e9f7ec3b696606ea96.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
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://buoev4bra11fe"]
|
||||
|
||||
[ext_resource type="Script" path="res://main_hub.gd" id="1_rvfpd"]
|
||||
[ext_resource type="PackedScene" uid="uid://cahspuhi43bx7" path="res://TitleScreen.tscn" id="2_3wmv1"]
|
||||
[ext_resource type="PackedScene" uid="uid://chytk2cctjk3x" path="res://Office.tscn" id="3_whctb"]
|
||||
[ext_resource type="PackedScene" uid="uid://dcjhx2g4d056v" path="res://Bedroom.tscn" id="4_4fm57"]
|
||||
[ext_resource type="PackedScene" uid="uid://cahspuhi43bx7" path="res://title_screen.tscn" id="2_3wmv1"]
|
||||
[ext_resource type="PackedScene" uid="uid://chytk2cctjk3x" path="res://office.tscn" id="3_whctb"]
|
||||
[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"]
|
||||
|
||||
[node name="MainHub" type="Control"]
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dixsxwodxuf0b"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c3je4gir1qlot" path="res://Art/BlackScreen.png" id="1_0xuu6"]
|
||||
[ext_resource type="Texture2D" uid="uid://bchkgrmeeryiq" path="res://Art/MeetingRoom.png" id="2_2wcr2"]
|
||||
|
||||
[node name="dialogue_screens" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Background" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="UpperBorder" type="TextureRect" parent="Background"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
size_flags_stretch_ratio = 0.1
|
||||
texture = ExtResource("1_0xuu6")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="Background" type="TextureRect" parent="Background"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
size_flags_stretch_ratio = 1.5
|
||||
texture = ExtResource("2_2wcr2")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="LowerBorder" type="TextureRect" parent="Background"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
size_flags_stretch_ratio = 0.1
|
||||
texture = ExtResource("1_0xuu6")
|
||||
expand_mode = 1
|
||||
+5
-4
@@ -55,20 +55,21 @@ func _on_new_game_pressed():
|
||||
var text_container = $TextScreens/MarginContainer/IntroBoxContainer/TextContainer
|
||||
|
||||
transition("big", [$TitleScreen], [$TextScreens, text_container.get_child(0)])
|
||||
await $TextScreens.on_transition_finished
|
||||
await $TextScreens.next_slide
|
||||
|
||||
for i in 4:
|
||||
transition("small", [text_container.get_child(i)], [text_container.get_child(i+1)])
|
||||
await $TextScreens.on_transition_finished
|
||||
|
||||
await $TextScreens.next_slide
|
||||
|
||||
transition("big", [$TextScreens, text_container.get_child(4)], [$Office])
|
||||
await $TextScreens.next_slide
|
||||
|
||||
# Takes care of fading transitions between scenes
|
||||
func transition(size, scenes_to_hide, scenes_to_show):
|
||||
|
||||
TransitionScreen.transition(size)
|
||||
|
||||
await TransitionScreen.on_fading_finished
|
||||
await TransitionScreen.fading_finished
|
||||
|
||||
for scene in scenes_to_hide:
|
||||
scene.hide()
|
||||
|
||||
+7
-11
@@ -3,14 +3,14 @@ extends CanvasLayer
|
||||
@onready var intro_text_container = $MarginContainer/IntroBoxContainer/TextContainer
|
||||
@onready var skip = $SkipContainer/SkipButton
|
||||
|
||||
signal on_skip_request
|
||||
signal on_transition_finished
|
||||
signal skip_request
|
||||
signal next_slide
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
skip.pressed.connect(_on_skip_pressed)
|
||||
self.connect("on_skip_request", _on_skip_request)
|
||||
self.connect("skip_request", _on_skip_request)
|
||||
|
||||
self.hide()
|
||||
for node in intro_text_container.get_children():
|
||||
@@ -19,21 +19,17 @@ func _ready() -> void:
|
||||
|
||||
|
||||
func _on_skip_pressed():
|
||||
if Globals.is_transitioning == false:
|
||||
on_skip_request.emit()
|
||||
else:
|
||||
pass
|
||||
skip_request.emit()
|
||||
|
||||
|
||||
func _input(event):
|
||||
if event is InputEventKey and event.pressed and Globals.is_transitioning == false:
|
||||
if event.keycode == KEY_SPACE:
|
||||
on_skip_request.emit()
|
||||
if event is InputEventKey and event.is_action_released("ui_accept"):
|
||||
skip_request.emit()
|
||||
|
||||
|
||||
func _on_skip_request():
|
||||
if Globals.is_transitioning == false:
|
||||
on_transition_finished.emit()
|
||||
next_slide.emit()
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
|
||||
+7
-1
@@ -1,9 +1,12 @@
|
||||
extends Control
|
||||
|
||||
signal new_game_pressed
|
||||
signal quit_game
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
self.get_node("MenuContainer/NewGame").pressed.connect(_on_new_game_pressed)
|
||||
self.get_node("MenuContainer/QuitGame").pressed.connect(_on_quit_game_pressed)
|
||||
pass
|
||||
|
||||
|
||||
@@ -13,6 +16,9 @@ func _process(delta: float) -> void:
|
||||
|
||||
|
||||
func _on_new_game_pressed() -> void:
|
||||
emit_signal("new_game_pressed")
|
||||
new_game_pressed.emit()
|
||||
print("Starting New Game...")
|
||||
pass # Replace with function body.
|
||||
|
||||
func _on_quit_game_pressed():
|
||||
get_tree().quit()
|
||||
|
||||
@@ -68,5 +68,3 @@ theme_override_font_sizes/font_size = 71
|
||||
text = "I am not sick"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[connection signal="pressed" from="MenuContainer/NewGame" to="." method="_on_new_game_pressed"]
|
||||
@@ -1,7 +1,7 @@
|
||||
extends CanvasLayer
|
||||
|
||||
signal on_fading_finished
|
||||
signal on_transition_finished
|
||||
signal fading_finished
|
||||
signal transition_finished
|
||||
|
||||
@onready var big_fading = $BigFading
|
||||
@onready var small_fading = $SmallFading
|
||||
@@ -19,12 +19,12 @@ func _ready() -> void:
|
||||
|
||||
func _on_animation_finished(anim_name):
|
||||
if anim_name == "fade_to_black":
|
||||
on_fading_finished.emit()
|
||||
fading_finished.emit()
|
||||
big_animation.play("fade_to_normal")
|
||||
small_animation.play("fade_to_normal")
|
||||
|
||||
elif anim_name == "fade_to_normal":
|
||||
on_transition_finished.emit()
|
||||
transition_finished.emit()
|
||||
Globals.is_transitioning = false
|
||||
big_fading.visible = false
|
||||
small_fading.visible = false
|
||||
|
||||
+20
-18
@@ -56,21 +56,6 @@ _data = {
|
||||
"fade_to_normal": SubResource("Animation_in743")
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_3ahpb"]
|
||||
resource_name = "fade_to_black"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_igu58"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
@@ -86,8 +71,9 @@ tracks/0/keys = {
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_do6sc"]
|
||||
resource_name = "fade_to_normal"
|
||||
[sub_resource type="Animation" id="Animation_3ahpb"]
|
||||
resource_name = "fade_to_black"
|
||||
length = 0.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
@@ -95,7 +81,23 @@ tracks/0/path = NodePath(".:modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1),
|
||||
"times": PackedFloat32Array(0, 0.5),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_do6sc"]
|
||||
resource_name = "fade_to_normal"
|
||||
length = 0.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.5),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
||||
|
||||
Reference in New Issue
Block a user