its game over WIP
This commit is contained in:
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 90 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://ocg21oes1wsk"
|
||||||
|
path="res://.godot/imported/its_game_over.png-c86779225fe540da92581c43211a3318.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Art/Rooms/screening_room/its_game_over.png"
|
||||||
|
dest_files=["res://.godot/imported/its_game_over.png-c86779225fe540da92581c43211a3318.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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
|
||||||
@@ -53,7 +53,7 @@ Musaka Rahata: [#worried] Please, I need help !
|
|||||||
~ part_end
|
~ part_end
|
||||||
[#itthatsmiles1] A cold shiver runs down your spine as you suddenly recognize It.
|
[#itthatsmiles1] A cold shiver runs down your spine as you suddenly recognize It.
|
||||||
It That Smiles: [#itthatsmiles2] [color=red]YOU... ARE... MINE.[/color]
|
It That Smiles: [#itthatsmiles2] [color=red]YOU... ARE... MINE.[/color]
|
||||||
do Globals.its_end.emit()
|
do UI.its_game_over.reveal()
|
||||||
=> END
|
=> END
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ border_width_bottom = 2
|
|||||||
border_color = Color(0.629675, 0.629675, 0.629674, 1)
|
border_color = Color(0.629675, 0.629675, 0.629674, 1)
|
||||||
|
|
||||||
[node name="ConfirmationDialog" type="CanvasLayer"]
|
[node name="ConfirmationDialog" type="CanvasLayer"]
|
||||||
layer = 128
|
layer = 101
|
||||||
|
|
||||||
[node name="ConfirmationDialog" type="PanelContainer" parent="."]
|
[node name="ConfirmationDialog" type="PanelContainer" parent="."]
|
||||||
anchors_preset = 8
|
anchors_preset = 8
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
shader_type canvas_item;
|
||||||
|
|
||||||
|
uniform sampler2D noise_tex;
|
||||||
|
uniform float progress : hint_range(0.0, 1.0) = 0.0;
|
||||||
|
uniform float softness : hint_range(0.001, 0.2) = 0.05;
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
vec4 img = texture(TEXTURE, UV);
|
||||||
|
float noise = texture(noise_tex, UV).r;
|
||||||
|
float alpha = 1.0 - smoothstep(progress - softness, progress + softness, noise);
|
||||||
|
COLOR = vec4(img.rgb, img.a * alpha);
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://n2f3kv6b7k2o
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
extends TextureRect
|
||||||
|
|
||||||
|
@onready var mat := material as ShaderMaterial
|
||||||
|
|
||||||
|
signal reveal_done
|
||||||
|
signal hide_done
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
|
||||||
|
#Hiding
|
||||||
|
hide()
|
||||||
|
|
||||||
|
#Setting up shader
|
||||||
|
randomize()
|
||||||
|
#Noise setup
|
||||||
|
var noise := FastNoiseLite.new()
|
||||||
|
noise.noise_type = FastNoiseLite.TYPE_SIMPLEX
|
||||||
|
noise.frequency = 20.0
|
||||||
|
noise.seed = randi()
|
||||||
|
|
||||||
|
var noise_tex := NoiseTexture2D.new()
|
||||||
|
noise_tex.noise = noise
|
||||||
|
noise_tex.width = 1920
|
||||||
|
noise_tex.height = 1080
|
||||||
|
noise_tex.seamless = true
|
||||||
|
|
||||||
|
mat.set_shader_parameter("noise_tex", noise_tex)
|
||||||
|
|
||||||
|
|
||||||
|
#Revealing game over in a noise spray
|
||||||
|
func reveal_spray():
|
||||||
|
|
||||||
|
show()
|
||||||
|
mat.set_shader_parameter("progress", 0.0)
|
||||||
|
|
||||||
|
var tween = create_tween()
|
||||||
|
tween.tween_method(set_progress, 0.0, 1.0, 3.0) \
|
||||||
|
.set_trans(Tween.TRANS_SINE) \
|
||||||
|
.set_ease(Tween.EASE_OUT)
|
||||||
|
|
||||||
|
await tween.finished
|
||||||
|
reveal_done.emit()
|
||||||
|
|
||||||
|
|
||||||
|
#hiding game over in a hiding spray
|
||||||
|
func hide_spray():
|
||||||
|
|
||||||
|
mat.set_shader_parameter("progress", 1.0)
|
||||||
|
|
||||||
|
var tween = create_tween()
|
||||||
|
tween.tween_method(set_progress, 1.0, 0.0, 3.0) \
|
||||||
|
.set_trans(Tween.TRANS_SINE) \
|
||||||
|
.set_ease(Tween.EASE_OUT)
|
||||||
|
|
||||||
|
await tween.finished
|
||||||
|
hide()
|
||||||
|
hide_done.emit()
|
||||||
|
|
||||||
|
|
||||||
|
#Progressing the reveal/hide
|
||||||
|
func set_progress(value: float):
|
||||||
|
mat.set_shader_parameter("progress", value)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cjft0c0ui8yhs
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
extends Control
|
||||||
|
|
||||||
|
@onready var background = $Background
|
||||||
|
@onready var back_to_menu = $UI/HBoxContainer/BackToMainMenu
|
||||||
|
@onready var reload_checkpoint = $UI/HBoxContainer/ReloadCheckpoint
|
||||||
|
@onready var message = $UI/Message
|
||||||
|
@onready var animation_player = $AnimationPlayer
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
|
||||||
|
#Hiding everything
|
||||||
|
hide()
|
||||||
|
for node in [background, back_to_menu, reload_checkpoint, message]:
|
||||||
|
node.hide()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#Reveals the game over screen
|
||||||
|
func reveal():
|
||||||
|
|
||||||
|
#Reveals the background image first
|
||||||
|
show()
|
||||||
|
background.show()
|
||||||
|
background.reveal_spray()
|
||||||
|
await background.reveal_done
|
||||||
|
|
||||||
|
#Reveals the text and buttons afterwards
|
||||||
|
for node in [message, back_to_menu, reload_checkpoint]:
|
||||||
|
node.modulate.a = 0.0
|
||||||
|
node.show()
|
||||||
|
animation_player.play("fade_in")
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://bru53a1mvu0t2
|
||||||
+10
-4
@@ -3,6 +3,8 @@ extends CanvasLayer
|
|||||||
@onready var next = $UI/SkipContainer/NextButton
|
@onready var next = $UI/SkipContainer/NextButton
|
||||||
@onready var confirmation_mask = $ConfirmationMask
|
@onready var confirmation_mask = $ConfirmationMask
|
||||||
|
|
||||||
|
@onready var its_game_over = $ITSGameOverControl
|
||||||
|
|
||||||
#Signals for progressing through slides
|
#Signals for progressing through slides
|
||||||
signal next_request
|
signal next_request
|
||||||
signal next_slide
|
signal next_slide
|
||||||
@@ -52,11 +54,14 @@ var resolution_list: Dictionary = {
|
|||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
|
||||||
#Connecting signals
|
#Connecting signals
|
||||||
#Next Signals
|
#GameOver Signals
|
||||||
|
|
||||||
|
|
||||||
|
#Next 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)
|
||||||
|
|
||||||
#Menu Signals
|
#Menu Signals
|
||||||
$UI/UpperContainer/Menu.pressed.connect(_on_menu_pressed)
|
$UI/UpperContainer/Menu.pressed.connect(_on_menu_pressed)
|
||||||
|
|
||||||
$UI/Menu/MarginContainer/VBoxContainer/Resume.pressed.connect(_on_resume_pressed)
|
$UI/Menu/MarginContainer/VBoxContainer/Resume.pressed.connect(_on_resume_pressed)
|
||||||
@@ -71,13 +76,13 @@ func _ready() -> void:
|
|||||||
$UI/Settings/MarginContainer/VBoxContainer/Control/Back.pressed.connect(_on_back_pressed)
|
$UI/Settings/MarginContainer/VBoxContainer/Control/Back.pressed.connect(_on_back_pressed)
|
||||||
$UI/Settings/MarginContainer/VBoxContainer/Control/BackTitle.pressed.connect(_on_back_title_pressed)
|
$UI/Settings/MarginContainer/VBoxContainer/Control/BackTitle.pressed.connect(_on_back_title_pressed)
|
||||||
|
|
||||||
#Save Slots Signals
|
#Save Slots Signals
|
||||||
$UI/Save/MarginContainer/VBoxContainer/SaveSlot1.pressed.connect(func(): _on_save_slot_pressed(1))
|
$UI/Save/MarginContainer/VBoxContainer/SaveSlot1.pressed.connect(func(): _on_save_slot_pressed(1))
|
||||||
$UI/Save/MarginContainer/VBoxContainer/SaveSlot2.pressed.connect(func(): _on_save_slot_pressed(2))
|
$UI/Save/MarginContainer/VBoxContainer/SaveSlot2.pressed.connect(func(): _on_save_slot_pressed(2))
|
||||||
$UI/Save/MarginContainer/VBoxContainer/SaveSlot3.pressed.connect(func(): _on_save_slot_pressed(3))
|
$UI/Save/MarginContainer/VBoxContainer/SaveSlot3.pressed.connect(func(): _on_save_slot_pressed(3))
|
||||||
$UI/Save/MarginContainer/VBoxContainer/SaveSlot4.pressed.connect(func(): _on_save_slot_pressed(4))
|
$UI/Save/MarginContainer/VBoxContainer/SaveSlot4.pressed.connect(func(): _on_save_slot_pressed(4))
|
||||||
|
|
||||||
#Load Slots Signals
|
#Load Slots Signals
|
||||||
$UI/Load/MarginContainer/VBoxContainer/LoadSlot1.pressed.connect(func(): _on_load_slot_pressed(1))
|
$UI/Load/MarginContainer/VBoxContainer/LoadSlot1.pressed.connect(func(): _on_load_slot_pressed(1))
|
||||||
$UI/Load/MarginContainer/VBoxContainer/LoadSlot2.pressed.connect(func(): _on_load_slot_pressed(2))
|
$UI/Load/MarginContainer/VBoxContainer/LoadSlot2.pressed.connect(func(): _on_load_slot_pressed(2))
|
||||||
$UI/Load/MarginContainer/VBoxContainer/LoadSlot3.pressed.connect(func(): _on_load_slot_pressed(3))
|
$UI/Load/MarginContainer/VBoxContainer/LoadSlot3.pressed.connect(func(): _on_load_slot_pressed(3))
|
||||||
@@ -322,3 +327,4 @@ func _on_resolution_selected(index: int):
|
|||||||
DisplayServer.window_set_size(resolution_size)
|
DisplayServer.window_set_size(resolution_size)
|
||||||
await get_tree().process_frame #Waits process_frame to avoid bugs
|
await get_tree().process_frame #Waits process_frame to avoid bugs
|
||||||
DisplayServer.window_set_position(top_left)
|
DisplayServer.window_set_position(top_left)
|
||||||
|
|
||||||
|
|||||||
+155
-2
@@ -1,8 +1,12 @@
|
|||||||
[gd_scene load_steps=7 format=3 uid="uid://dy40jygog8t3k"]
|
[gd_scene load_steps=16 format=3 uid="uid://dy40jygog8t3k"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://c0q67t6m1i4dl" path="res://Scenes/UI/ui.gd" id="1_mg12k"]
|
[ext_resource type="Script" uid="uid://c0q67t6m1i4dl" path="res://Scenes/UI/ui.gd" id="1_mg12k"]
|
||||||
[ext_resource type="FontFile" uid="uid://dv8ppra5tgn1t" path="res://Art/Fonts/PixelatedEleganceRegular-ovyAA.ttf" id="2_vb7na"]
|
[ext_resource type="FontFile" uid="uid://dv8ppra5tgn1t" path="res://Art/Fonts/PixelatedEleganceRegular-ovyAA.ttf" id="2_vb7na"]
|
||||||
[ext_resource type="Texture2D" uid="uid://l7786mlmvet8" path="res://Art/UI/menu_gear.png" id="3_ibj64"]
|
[ext_resource type="Texture2D" uid="uid://l7786mlmvet8" path="res://Art/UI/menu_gear.png" id="3_ibj64"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://ocg21oes1wsk" path="res://Art/Rooms/screening_room/its_game_over.png" id="4_1c2ca"]
|
||||||
|
[ext_resource type="Script" uid="uid://bru53a1mvu0t2" path="res://Scenes/UI/its_game_over_control.gd" id="4_duuxe"]
|
||||||
|
[ext_resource type="Shader" uid="uid://n2f3kv6b7k2o" path="res://Scenes/UI/its_game_over.gdshader" id="5_duuxe"]
|
||||||
|
[ext_resource type="Script" uid="uid://cjft0c0ui8yhs" path="res://Scenes/UI/its_game_over_background.gd" id="6_jfwrg"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fo2i3"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fo2i3"]
|
||||||
border_width_left = 2
|
border_width_left = 2
|
||||||
@@ -19,8 +23,90 @@ default_font = ExtResource("2_vb7na")
|
|||||||
default_font_size = 16
|
default_font_size = 16
|
||||||
OptionButton/fonts/font = ExtResource("2_vb7na")
|
OptionButton/fonts/font = ExtResource("2_vb7na")
|
||||||
|
|
||||||
|
[sub_resource type="Theme" id="Theme_mbl0m"]
|
||||||
|
Button/font_sizes/font_size = 30
|
||||||
|
Button/fonts/font = ExtResource("2_vb7na")
|
||||||
|
RichTextLabel/fonts/normal_font = ExtResource("2_vb7na")
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_duuxe"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("HBoxContainer/ReloadCheckpoint:modulate")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 1)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("HBoxContainer/BackToMainMenu:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_jfwrg"]
|
||||||
|
resource_name = "fade_in"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("Message: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(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("HBoxContainer/ReloadCheckpoint:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("HBoxContainer/BackToMainMenu:modulate")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_mbl0m"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_duuxe"),
|
||||||
|
&"fade_in": SubResource("Animation_jfwrg")
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_duuxe"]
|
||||||
|
shader = ExtResource("5_duuxe")
|
||||||
|
shader_parameter/progress = 0.0
|
||||||
|
shader_parameter/softness = 0.05
|
||||||
|
|
||||||
[node name="UILayer" type="CanvasLayer" node_paths=PackedStringArray("text_slider", "auto_slider", "text_counter", "auto_counter", "autoplay", "auto_mask", "display_button", "resolution_button")]
|
[node name="UILayer" type="CanvasLayer" node_paths=PackedStringArray("text_slider", "auto_slider", "text_counter", "auto_counter", "autoplay", "auto_mask", "display_button", "resolution_button")]
|
||||||
layer = 127
|
layer = 100
|
||||||
script = ExtResource("1_mg12k")
|
script = ExtResource("1_mg12k")
|
||||||
text_slider = NodePath("UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/TextSpeed/TextSlider")
|
text_slider = NodePath("UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/TextSpeed/TextSlider")
|
||||||
auto_slider = NodePath("UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/Control/AutoSpeed/AutoSlider")
|
auto_slider = NodePath("UI/Settings/MarginContainer/VBoxContainer/GridContainer/DialogueContainer/VBoxContainer2/DialogueOptions/VBoxContainer/Control/AutoSpeed/AutoSlider")
|
||||||
@@ -689,3 +775,70 @@ grow_horizontal = 2
|
|||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
mouse_force_pass_scroll_events = false
|
mouse_force_pass_scroll_events = false
|
||||||
color = Color(0, 0, 0, 0.784314)
|
color = Color(0, 0, 0, 0.784314)
|
||||||
|
|
||||||
|
[node name="ITSGameOverControl" type="Control" parent="."]
|
||||||
|
z_index = 12
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
mouse_filter = 2
|
||||||
|
theme = SubResource("Theme_mbl0m")
|
||||||
|
script = ExtResource("4_duuxe")
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="ITSGameOverControl"]
|
||||||
|
root_node = NodePath("../UI")
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_mbl0m")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Background" type="TextureRect" parent="ITSGameOverControl"]
|
||||||
|
material = SubResource("ShaderMaterial_duuxe")
|
||||||
|
layout_mode = 0
|
||||||
|
offset_right = 1920.0
|
||||||
|
offset_bottom = 1080.0
|
||||||
|
texture = ExtResource("4_1c2ca")
|
||||||
|
script = ExtResource("6_jfwrg")
|
||||||
|
|
||||||
|
[node name="UI" type="VBoxContainer" parent="ITSGameOverControl"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -625.0
|
||||||
|
offset_top = -175.0
|
||||||
|
offset_right = 625.0
|
||||||
|
offset_bottom = 175.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_constants/separation = 100
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="Message" type="RichTextLabel" parent="ITSGameOverControl/UI"]
|
||||||
|
modulate = Color(1, 1, 1, 0)
|
||||||
|
custom_minimum_size = Vector2(200, 150)
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_font_sizes/normal_font_size = 100
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[color=dark_red]IT HAS YOU...[/color]"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="ITSGameOverControl/UI"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 50
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="ReloadCheckpoint" type="Button" parent="ITSGameOverControl/UI/HBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(600, 100)
|
||||||
|
layout_mode = 2
|
||||||
|
text = "RELOAD LATEST CHECKPOINT"
|
||||||
|
|
||||||
|
[node name="BackToMainMenu" type="Button" parent="ITSGameOverControl/UI/HBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(600, 100)
|
||||||
|
layout_mode = 2
|
||||||
|
text = "BACK TO MAIN MENU"
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
var is_transitioning : bool = false
|
|
||||||
var day_count : int = 1
|
var day_count : int = 1
|
||||||
var floor_count : int = -1
|
var floor_count : int = -1
|
||||||
var patient_count : int = 1
|
var patient_count : int = 1
|
||||||
|
|||||||
+9
-7
@@ -37,6 +37,8 @@ func _ready() -> void:
|
|||||||
UI.connect("text_value_changed", self._on_text_value_changed)
|
UI.connect("text_value_changed", self._on_text_value_changed)
|
||||||
UI.connect("auto_value_changed", self._on_auto_value_changed)
|
UI.connect("auto_value_changed", self._on_auto_value_changed)
|
||||||
|
|
||||||
|
UI.its_game_over.back_to_menu.pressed.connect(self._on_main_menu_pressed)
|
||||||
|
|
||||||
Globals.character_label_color_change.connect(self._on_character_label_color_change)
|
Globals.character_label_color_change.connect(self._on_character_label_color_change)
|
||||||
Globals.start_balloon.connect(self.start_balloon)
|
Globals.start_balloon.connect(self.start_balloon)
|
||||||
|
|
||||||
@@ -88,7 +90,7 @@ func start_day():
|
|||||||
|
|
||||||
var scenes_to_hide: Array[Node] = [$TitleScreen]
|
var scenes_to_hide: Array[Node] = [$TitleScreen]
|
||||||
var scenes_to_show: Array[Node] = [$TextScreens, $TextScreens/Day]
|
var scenes_to_show: Array[Node] = [$TextScreens, $TextScreens/Day]
|
||||||
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)
|
TransitionScreen.transition(scenes_to_hide, scenes_to_show)
|
||||||
await TransitionScreen.transition_finished
|
await TransitionScreen.transition_finished
|
||||||
await get_tree().create_timer(1.0).timeout
|
await get_tree().create_timer(1.0).timeout
|
||||||
|
|
||||||
@@ -99,12 +101,12 @@ func start_day():
|
|||||||
#Transitioning to the screening desk
|
#Transitioning to the screening desk
|
||||||
scenes_to_hide = scenes_to_show
|
scenes_to_hide = scenes_to_show
|
||||||
scenes_to_show = [$ScreeningDesk, UI, UI.get_node("UI/UpperContainer")]
|
scenes_to_show = [$ScreeningDesk, UI, UI.get_node("UI/UpperContainer")]
|
||||||
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)
|
TransitionScreen.transition(scenes_to_hide, scenes_to_show)
|
||||||
await TransitionScreen.transition_finished
|
await TransitionScreen.transition_finished
|
||||||
|
|
||||||
#Supervisor Dialogue
|
#Supervisor Dialogue
|
||||||
$ScreeningDesk.supervisor.dialogue("interfloor_" + str(-Globals.floor_count-1))
|
#$ScreeningDesk.supervisor.dialogue("interfloor_" + str(-Globals.floor_count-1))
|
||||||
await $ScreeningDesk.supervisor.dialogue_finished
|
#await $ScreeningDesk.supervisor.dialogue_finished
|
||||||
|
|
||||||
$ScreeningDesk.console_screen.display(Globals.directives)
|
$ScreeningDesk.console_screen.display(Globals.directives)
|
||||||
$ScreeningDesk.new_patient()
|
$ScreeningDesk.new_patient()
|
||||||
@@ -182,7 +184,7 @@ func load_game(load_slot_number:int):
|
|||||||
#Transitioning to loaded Save
|
#Transitioning to loaded Save
|
||||||
var scenes_to_hide = [$TitleScreen, $Bedroom, $TextScreens, $TextScreens/Day, $ScreeningDesk.patient_controls, $ScreeningDesk.end_of_day_controls, $ScreeningDesk.patient_texture, $ScreeningDesk.panel_container, $ScreeningDesk.face_zoom] + $ScreeningDesk.margin_container.get_children()
|
var scenes_to_hide = [$TitleScreen, $Bedroom, $TextScreens, $TextScreens/Day, $ScreeningDesk.patient_controls, $ScreeningDesk.end_of_day_controls, $ScreeningDesk.patient_texture, $ScreeningDesk.panel_container, $ScreeningDesk.face_zoom] + $ScreeningDesk.margin_container.get_children()
|
||||||
var scenes_to_show = [$ScreeningDesk, $ScreeningDesk.alone_controls, UI.get_node("UI/UpperContainer")]
|
var scenes_to_show = [$ScreeningDesk, $ScreeningDesk.alone_controls, UI.get_node("UI/UpperContainer")]
|
||||||
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)
|
TransitionScreen.transition(scenes_to_hide, scenes_to_show)
|
||||||
await TransitionScreen.transition_finished
|
await TransitionScreen.transition_finished
|
||||||
$ScreeningDesk.new_patient()
|
$ScreeningDesk.new_patient()
|
||||||
|
|
||||||
@@ -211,9 +213,9 @@ func _on_main_menu_pressed():
|
|||||||
UI.get_node("UI/UpperContainer").hide()
|
UI.get_node("UI/UpperContainer").hide()
|
||||||
|
|
||||||
#Going back to main menu
|
#Going back to main menu
|
||||||
var scenes_to_hide = [$ScreeningDesk, $TextScreens, $TextScreens/Day]
|
var scenes_to_hide = [$ScreeningDesk, $TextScreens, $TextScreens/Day, UI.its_game_over]
|
||||||
var scenes_to_show = [$TitleScreen]
|
var scenes_to_show = [$TitleScreen]
|
||||||
TransitionScreen.transition("big", scenes_to_hide, scenes_to_show)
|
TransitionScreen.transition(scenes_to_hide, scenes_to_show)
|
||||||
await TransitionScreen.transition_finished
|
await TransitionScreen.transition_finished
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://diln53wxa3oep" path="res://Art/Rooms/screening_room/journal_open.png" id="5_31hpe"]
|
[ext_resource type="Texture2D" uid="uid://diln53wxa3oep" path="res://Art/Rooms/screening_room/journal_open.png" id="5_31hpe"]
|
||||||
[ext_resource type="Script" uid="uid://cdkbyikbjqlsh" path="res://Scenes/screening_desk/supervisor.gd" id="5_43vqp"]
|
[ext_resource type="Script" uid="uid://cdkbyikbjqlsh" path="res://Scenes/screening_desk/supervisor.gd" id="5_43vqp"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cci0pb12chlps" path="res://Art/Rooms/screening_room/computer.png" id="6_6a8ar"]
|
[ext_resource type="Texture2D" uid="uid://cci0pb12chlps" path="res://Art/Rooms/screening_room/computer.png" id="6_6a8ar"]
|
||||||
[ext_resource type="Texture2D" path="res://Art/Patients/patient_it_that_smiles_01/patient_it_that_smiles_01_crying.png" id="6_dxtf8"]
|
[ext_resource type="Texture2D" uid="uid://xtmmovqohk8v" path="res://Art/Patients/patient_its_01/patient_its_01_neutral.png" id="6_dxtf8"]
|
||||||
[ext_resource type="Texture2D" uid="uid://jychpkygmjib" path="res://Art/Rooms/screening_room/desk.png" id="7_dp545"]
|
[ext_resource type="Texture2D" uid="uid://jychpkygmjib" path="res://Art/Rooms/screening_room/desk.png" id="7_dp545"]
|
||||||
[ext_resource type="Theme" uid="uid://3k7sqw211ncl" path="res://Art/UI/button_theme.tres" id="8_hxrv4"]
|
[ext_resource type="Theme" uid="uid://3k7sqw211ncl" path="res://Art/UI/button_theme.tres" id="8_hxrv4"]
|
||||||
[ext_resource type="Texture2D" uid="uid://c3frxq4vyu0pr" path="res://Art/Rooms/screening_room/console_screen.png" id="9_68gp8"]
|
[ext_resource type="Texture2D" uid="uid://c3frxq4vyu0pr" path="res://Art/Rooms/screening_room/console_screen.png" id="9_68gp8"]
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
extends ColorRect
|
||||||
|
|
||||||
|
@onready var animation = $FadingMaskAnimation
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
hide()
|
||||||
|
|
||||||
|
|
||||||
|
#Handles fading transitions
|
||||||
|
func fade_in():
|
||||||
|
|
||||||
|
modulate.a = 0.0
|
||||||
|
show()
|
||||||
|
animation.play("fade_in")
|
||||||
|
|
||||||
|
|
||||||
|
func fade_out():
|
||||||
|
|
||||||
|
animation.play("fade_out")
|
||||||
|
await animation.animation_finished
|
||||||
|
hide()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://dbjei4d2lfwnb
|
||||||
@@ -1,71 +1,30 @@
|
|||||||
extends CanvasLayer
|
extends CanvasLayer
|
||||||
|
|
||||||
signal fading_finished
|
@onready var fading_mask = $FadingMask
|
||||||
signal transition_finished
|
@onready var its_game_over = $ITSGameOver
|
||||||
|
|
||||||
@onready var big_fading = $BigFading
|
|
||||||
@onready var small_fading = $SmallFading
|
|
||||||
@onready var big_animation = $BigFading/BigFadingAnimation
|
|
||||||
@onready var small_animation = $SmallFading/SmallFadingAnimation
|
|
||||||
@onready var mask = $Mask
|
@onready var mask = $Mask
|
||||||
|
|
||||||
|
signal transition_finished
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
|
||||||
|
#Transitions the scenes with a fading mask
|
||||||
|
func transition(scenes_to_hide, scenes_to_show):
|
||||||
|
|
||||||
#Hiding masks
|
#Fade in
|
||||||
big_fading.visible = false
|
fading_mask.fade_in()
|
||||||
small_fading.visible = false
|
await fading_mask.animation.animation_finished
|
||||||
mask.visible = false
|
|
||||||
|
|
||||||
#Connecting signals
|
#Hides and show appropriates scenes
|
||||||
big_animation.connect("animation_finished", _on_animation_finished)
|
|
||||||
small_animation.connect("animation_finished", _on_animation_finished)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _on_animation_finished(anim_name):
|
|
||||||
|
|
||||||
#Fades back to normal when fade_to_black is done
|
|
||||||
if anim_name == "fade_to_black":
|
|
||||||
fading_finished.emit()
|
|
||||||
big_animation.play("fade_to_normal")
|
|
||||||
small_animation.play("fade_to_normal")
|
|
||||||
|
|
||||||
#Resets everything when fading_to_normal is done
|
|
||||||
elif anim_name == "fade_to_normal":
|
|
||||||
transition_finished.emit()
|
|
||||||
Globals.is_transitioning = false
|
|
||||||
big_fading.visible = false
|
|
||||||
small_fading.visible = false
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Handles fading transitions
|
|
||||||
func fading(size):
|
|
||||||
|
|
||||||
Globals.is_transitioning = true
|
|
||||||
|
|
||||||
if size == "big":
|
|
||||||
big_fading.visible = true
|
|
||||||
big_animation.play("fade_to_black")
|
|
||||||
elif size == "small":
|
|
||||||
small_fading.visible = true
|
|
||||||
small_animation.play("fade_to_black")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Transitions the scenes
|
|
||||||
func transition(fading_screen_size, scenes_to_hide, scenes_to_show):
|
|
||||||
|
|
||||||
#Fade in and out
|
|
||||||
fading(fading_screen_size)
|
|
||||||
await self.fading_finished
|
|
||||||
|
|
||||||
#When the screen is black from fading, change the shown scenes before it fades back to normal
|
|
||||||
for scene in scenes_to_hide:
|
for scene in scenes_to_hide:
|
||||||
scene.hide()
|
scene.hide()
|
||||||
for scene in scenes_to_show:
|
for scene in scenes_to_show:
|
||||||
scene.show()
|
scene.show()
|
||||||
|
|
||||||
|
#Fade out
|
||||||
|
fading_mask.fade_out()
|
||||||
|
await fading_mask.animation.animation_finished
|
||||||
|
transition_finished.emit()
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
[gd_scene load_steps=10 format=3 uid="uid://drk1l7ijo4xq5"]
|
[gd_scene load_steps=7 format=3 uid="uid://drk1l7ijo4xq5"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dywfa5vbgtrkb" path="res://Scenes/transition_screen/transition_screen.gd" id="1_hbjtk"]
|
[ext_resource type="Script" uid="uid://dywfa5vbgtrkb" path="res://Scenes/transition_screen/transition_screen.gd" id="1_hbjtk"]
|
||||||
|
[ext_resource type="Script" uid="uid://dbjei4d2lfwnb" path="res://Scenes/transition_screen/fading_mask.gd" id="2_m3r4n"]
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_n85x3"]
|
[sub_resource type="Animation" id="Animation_n85x3"]
|
||||||
length = 0.001
|
length = 0.001
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/imported = false
|
tracks/0/imported = false
|
||||||
tracks/0/enabled = true
|
tracks/0/enabled = true
|
||||||
tracks/0/path = NodePath("BigFading:modulate")
|
tracks/0/path = NodePath("FadingMask:modulate")
|
||||||
tracks/0/interp = 1
|
tracks/0/interp = 1
|
||||||
tracks/0/loop_wrap = true
|
tracks/0/loop_wrap = true
|
||||||
tracks/0/keys = {
|
tracks/0/keys = {
|
||||||
@@ -22,7 +23,7 @@ resource_name = "fade_to_black"
|
|||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/imported = false
|
tracks/0/imported = false
|
||||||
tracks/0/enabled = true
|
tracks/0/enabled = true
|
||||||
tracks/0/path = NodePath("BigFading:modulate")
|
tracks/0/path = NodePath("FadingMask:modulate")
|
||||||
tracks/0/interp = 1
|
tracks/0/interp = 1
|
||||||
tracks/0/loop_wrap = true
|
tracks/0/loop_wrap = true
|
||||||
tracks/0/keys = {
|
tracks/0/keys = {
|
||||||
@@ -37,7 +38,7 @@ resource_name = "fade_to_normal"
|
|||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/imported = false
|
tracks/0/imported = false
|
||||||
tracks/0/enabled = true
|
tracks/0/enabled = true
|
||||||
tracks/0/path = NodePath("BigFading:modulate")
|
tracks/0/path = NodePath("FadingMask:modulate")
|
||||||
tracks/0/interp = 1
|
tracks/0/interp = 1
|
||||||
tracks/0/loop_wrap = true
|
tracks/0/loop_wrap = true
|
||||||
tracks/0/keys = {
|
tracks/0/keys = {
|
||||||
@@ -50,69 +51,15 @@ tracks/0/keys = {
|
|||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5yx4m"]
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5yx4m"]
|
||||||
_data = {
|
_data = {
|
||||||
&"RESET": SubResource("Animation_n85x3"),
|
&"RESET": SubResource("Animation_n85x3"),
|
||||||
&"fade_to_black": SubResource("Animation_20bx3"),
|
&"fade_in": SubResource("Animation_20bx3"),
|
||||||
&"fade_to_normal": SubResource("Animation_in743")
|
&"fade_out": SubResource("Animation_in743")
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_igu58"]
|
|
||||||
length = 0.001
|
|
||||||
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),
|
|
||||||
"transitions": PackedFloat32Array(1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Color(1, 1, 1, 1)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[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
|
|
||||||
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, 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)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_h2xbl"]
|
|
||||||
_data = {
|
|
||||||
&"RESET": SubResource("Animation_igu58"),
|
|
||||||
&"fade_to_black": SubResource("Animation_3ahpb"),
|
|
||||||
&"fade_to_normal": SubResource("Animation_do6sc")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="transition_screen" type="CanvasLayer"]
|
[node name="transition_screen" type="CanvasLayer"]
|
||||||
layer = 110
|
layer = 102
|
||||||
script = ExtResource("1_hbjtk")
|
script = ExtResource("1_hbjtk")
|
||||||
|
|
||||||
[node name="BigFading" type="ColorRect" parent="."]
|
[node name="FadingMask" type="ColorRect" parent="."]
|
||||||
modulate = Color(0, 0, 0, 0)
|
modulate = Color(0, 0, 0, 0)
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
@@ -120,25 +67,16 @@ anchor_bottom = 1.0
|
|||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
color = Color(0, 0, 0, 1)
|
color = Color(0, 0, 0, 1)
|
||||||
|
script = ExtResource("2_m3r4n")
|
||||||
|
|
||||||
[node name="BigFadingAnimation" type="AnimationPlayer" parent="BigFading"]
|
[node name="FadingMaskAnimation" type="AnimationPlayer" parent="FadingMask"]
|
||||||
root_node = NodePath("../..")
|
root_node = NodePath("../..")
|
||||||
libraries = {
|
libraries = {
|
||||||
&"": SubResource("AnimationLibrary_5yx4m")
|
&"": SubResource("AnimationLibrary_5yx4m")
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="SmallFading" type="ColorRect" parent="."]
|
|
||||||
offset_top = 244.0
|
|
||||||
offset_right = 1923.0
|
|
||||||
offset_bottom = 899.0
|
|
||||||
color = Color(0, 0, 0, 1)
|
|
||||||
|
|
||||||
[node name="SmallFadingAnimation" type="AnimationPlayer" parent="SmallFading"]
|
|
||||||
libraries = {
|
|
||||||
&"": SubResource("AnimationLibrary_h2xbl")
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="Mask" type="ColorRect" parent="."]
|
[node name="Mask" type="ColorRect" parent="."]
|
||||||
|
visible = false
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
|||||||
Reference in New Issue
Block a user