From 0b6d4c641d152e71626ac4d6a74596e7e5d01136 Mon Sep 17 00:00:00 2001 From: Cold-Mint Date: Tue, 16 Jul 2024 20:59:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=90=AF=E5=8A=A8=E9=A1=B5?= =?UTF-8?q?=E5=8A=A8=E7=94=BB=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/splashScreen.tscn | 196 +++++++++++++++--- scripts/loader/uiLoader/MainMenuLoader.cs | 7 - scripts/loader/uiLoader/SplashScreenLoader.cs | 11 +- 3 files changed, 172 insertions(+), 42 deletions(-) diff --git a/scenes/splashScreen.tscn b/scenes/splashScreen.tscn index 8d8e68a..332295a 100644 --- a/scenes/splashScreen.tscn +++ b/scenes/splashScreen.tscn @@ -1,9 +1,142 @@ -[gd_scene load_steps=4 format=3 uid="uid://rx7t26ldvonc"] +[gd_scene load_steps=7 format=3 uid="uid://rx7t26ldvonc"] [ext_resource type="Script" path="res://scripts/loader/uiLoader/SplashScreenLoader.cs" id="1_3pcuw"] [ext_resource type="Texture2D" uid="uid://cb3gn8xb5r4gm" path="res://sprites/icons/coldmint.png" id="1_0333i"] [ext_resource type="Texture2D" uid="uid://b877262di2jp5" path="res://sprites/icons/godot.png" id="2_y25sr"] +[sub_resource type="Animation" id="Animation_j4ppv"] +resource_name = "startup" +length = 4.5 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("ColdMintTextureRect:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.5, 1.5, 2), +"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)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("ColdMintLabel:modulate") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.5, 1.5, 2), +"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)] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("GodotLabel:modulate") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(2.5, 3, 3.5, 4), +"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)] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("GodotTextureRect:modulate") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(2.5, 3, 3.5, 4), +"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)] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("loadingStateLabel:modulate") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(4, 4.5), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)] +} + +[sub_resource type="Animation" id="Animation_bisl3"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("ColdMintTextureRect: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, 0)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("ColdMintLabel: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)] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("GodotLabel:modulate") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 0)] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("GodotTextureRect:modulate") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 0)] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("loadingStateLabel:modulate") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 0)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_mraly"] +_data = { +"RESET": SubResource("Animation_bisl3"), +"startup": SubResource("Animation_j4ppv") +} + [node name="SplashScreen" type="Control"] layout_mode = 3 anchors_preset = 15 @@ -23,94 +156,91 @@ grow_vertical = 2 color = Color(0.129412, 0.129412, 0.129412, 1) [node name="ColdMintTextureRect" type="TextureRect" parent="."] +modulate = Color(1, 1, 1, 0) layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -offset_left = 104.0 +offset_left = -96.0 offset_top = -196.0 -offset_right = 296.0 -offset_bottom = -4.0 +offset_right = 96.0002 +offset_bottom = -3.99969 grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("1_0333i") [node name="GodotTextureRect" type="TextureRect" parent="."] +modulate = Color(1, 1, 1, 0) layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -offset_left = -296.0 +offset_left = -96.0 offset_top = -196.0 -offset_right = -104.0 +offset_right = 96.0 offset_bottom = -4.0 grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("2_y25sr") [node name="ColdMintLabel" type="Label" parent="."] +modulate = Color(1, 1, 1, 0) layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -offset_left = 131.0 -offset_top = 28.0 -offset_right = 260.0 -offset_bottom = 77.0 +offset_left = -64.5 +offset_top = 25.5 +offset_right = 64.5 +offset_bottom = 74.5 grow_horizontal = 2 grow_vertical = 2 theme_override_font_sizes/font_size = 32 text = "ColdMint" [node name="GodotLabel" type="Label" parent="."] +modulate = Color(1, 1, 1, 0) layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -offset_left = -286.0 -offset_top = 22.0 -offset_right = -96.0 -offset_bottom = 71.0 +offset_left = -95.0 +offset_top = 25.5 +offset_right = 95.0 +offset_bottom = 74.5 grow_horizontal = 2 grow_vertical = 2 theme_override_font_sizes/font_size = 32 text = "Godot Engine" -[node name="ColorRect2" type="ColorRect" parent="."] -layout_mode = 1 -anchors_preset = 8 -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -offset_left = -0.5 -offset_top = -196.0 -offset_right = 0.5 -offset_bottom = 74.0 -grow_horizontal = 2 -grow_vertical = 2 - [node name="loadingStateLabel" type="Label" parent="."] +modulate = Color(1, 1, 1, 0) layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -offset_left = -66.0 -offset_top = 184.5 -offset_right = 66.0 -offset_bottom = 215.5 +offset_left = -72.5 +offset_top = -24.5 +offset_right = 72.5 +offset_bottom = 24.5 grow_horizontal = 2 grow_vertical = 2 -theme_override_font_sizes/font_size = 20 +theme_override_font_sizes/font_size = 32 text = "ui_loading" horizontal_alignment = 1 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_mraly") +} +autoplay = "startup" diff --git a/scripts/loader/uiLoader/MainMenuLoader.cs b/scripts/loader/uiLoader/MainMenuLoader.cs index c1d7e43..f05e4dc 100644 --- a/scripts/loader/uiLoader/MainMenuLoader.cs +++ b/scripts/loader/uiLoader/MainMenuLoader.cs @@ -1,14 +1,7 @@ using System; -using System.IO; using System.Text; -using ColdMint.scripts.camp; using ColdMint.scripts.contribute; -using ColdMint.scripts.deathInfo; using ColdMint.scripts.debug; -using ColdMint.scripts.inventory; -using ColdMint.scripts.loot; -using ColdMint.scripts.map; -using ColdMint.scripts.map.roomInjectionProcessor; using ColdMint.scripts.utils; using Godot; diff --git a/scripts/loader/uiLoader/SplashScreenLoader.cs b/scripts/loader/uiLoader/SplashScreenLoader.cs index 2b804bb..8817992 100644 --- a/scripts/loader/uiLoader/SplashScreenLoader.cs +++ b/scripts/loader/uiLoader/SplashScreenLoader.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Text; using System.Threading.Tasks; @@ -22,15 +22,22 @@ public partial class SplashScreenLoader : UiLoaderTemplate { private Label? _loadingLabel; private PackedScene? _mainMenuScene; + private AnimationPlayer? _animationPlayer; public override void InitializeData() { _mainMenuScene = GD.Load("res://scenes/mainMenu.tscn"); } - public override async void InitializeUi() + public override void InitializeUi() { _loadingLabel = GetNode