Added intro text

This commit is contained in:
Florian 2025-09-19 12:02:17 +02:00
parent 968c7ca450
commit e3d6d956fc
4 changed files with 128 additions and 1 deletions

View file

@ -1,9 +1,10 @@
[gd_scene load_steps=12 format=3 uid="uid://bjuak0sbjpamb"]
[gd_scene load_steps=13 format=3 uid="uid://bjuak0sbjpamb"]
[ext_resource type="PackedScene" uid="uid://cmaovvr15b3qk" path="res://player/player.tscn" id="2_1bvp3"]
[ext_resource type="Texture2D" uid="uid://d3fpq76anm4t7" path="res://world/Background Prototype/Background prototype.png" id="3_kek77"]
[ext_resource type="PackedScene" uid="uid://jjoyj1ldafkf" path="res://world/earth.tscn" id="3_lquwl"]
[ext_resource type="Script" uid="uid://colvx6wq0e8n7" path="res://world/building_generator.gd" id="4_1bvp3"]
[ext_resource type="PackedScene" uid="uid://snvs7fty1l5a" path="res://ui/initial_text/initial_text.tscn" id="4_dg77c"]
[ext_resource type="PackedScene" uid="uid://73g8y37skebh" path="res://ui/item_ui/item_ui.tscn" id="6_4c57u"]
[ext_resource type="PackedScene" uid="uid://cjsrtswk4vgf2" path="res://ui/healthbar/healthbar.tscn" id="6_7mycd"]
[ext_resource type="PackedScene" uid="uid://dpdn2php3ydsv" path="res://ui/death_screen/death_screen.tscn" id="7_5vw27"]
@ -40,6 +41,8 @@ autostart = true
[node name="UIOverlay" type="CanvasLayer" parent="."]
[node name="InitialText" parent="UIOverlay" instance=ExtResource("4_dg77c")]
[node name="Healthbar" parent="UIOverlay" instance=ExtResource("6_7mycd")]
offset_right = 96.0
offset_bottom = 96.0

View file

@ -0,0 +1,8 @@
extends MarginContainer
func _ready():
%Animation.play("show_initial_text")
func _on_animation_animation_finished(_anim_name: StringName) -> void:
queue_free()

View file

@ -0,0 +1 @@
uid://fx0foo28m31m

View file

@ -0,0 +1,115 @@
[gd_scene load_steps=7 format=3 uid="uid://snvs7fty1l5a"]
[ext_resource type="Script" uid="uid://fx0foo28m31m" path="res://ui/initial_text/initial_text.gd" id="1_a8dwj"]
[ext_resource type="Theme" uid="uid://bn4i5ordp2chs" path="res://small_theme.tres" id="1_st7ea"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ay53y"]
bg_color = Color(0, 0, 0, 0.5019608)
corner_radius_top_left = 20
corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
[sub_resource type="Animation" id="Animation_ay53y"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:visible_ratio")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [1.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("..: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, 0)]
}
[sub_resource type="Animation" id="Animation_a8dwj"]
resource_name = "show_initial_text"
length = 7.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:visible_ratio")
tracks/0/interp = 1
tracks/0/loop_wrap = false
tracks/0/keys = {
"times": PackedFloat32Array(0, 2.5, 7),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [0.0, 1.0, 1.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("..:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.5, 5.5, 7),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_30hl2"]
_data = {
&"RESET": SubResource("Animation_ay53y"),
&"show_initial_text": SubResource("Animation_a8dwj")
}
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="InitialText" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -500.0
offset_right = 500.0
offset_bottom = 320.0
grow_horizontal = 2
theme_override_constants/margin_top = 120
script = ExtResource("1_a8dwj")
[node name="PanelContainer" type="PanelContainer" parent="InitialText"]
modulate = Color(1, 1, 1, 0)
custom_minimum_size = Vector2(1000, 200)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_ay53y")
[node name="Label" type="RichTextLabel" parent="InitialText/PanelContainer"]
layout_mode = 2
theme = ExtResource("1_st7ea")
bbcode_enabled = true
text = "They are hiding on the other side of the word — building towers to escape the rising [color=green] morass [/color]."
horizontal_alignment = 1
vertical_alignment = 1
[node name="Animation" type="AnimationPlayer" parent="InitialText"]
unique_name_in_owner = true
root_node = NodePath("../PanelContainer/Label")
libraries = {
&"": SubResource("AnimationLibrary_30hl2")
}
[connection signal="animation_finished" from="InitialText/Animation" to="InitialText" method="_on_animation_animation_finished"]