diff --git a/Scenes/HUD/IntroLogos.tscn b/Scenes/HUD/IntroLogos.tscn new file mode 100644 index 00000000..562bee99 --- /dev/null +++ b/Scenes/HUD/IntroLogos.tscn @@ -0,0 +1,61 @@ +[gd_scene load_steps=6 format=3 uid="uid://dew6axbejrusj"] + +[ext_resource type="Script" uid="uid://catf2cx0f8cnu" path="res://Scripts/UI/IntroLogos.cs" id="1_p43sh"] +[ext_resource type="Texture2D" uid="uid://dfncwtgc4ae6e" path="res://Sprites/UI/MaddoLogo.png" id="1_rm3c6"] +[ext_resource type="LabelSettings" uid="uid://buk3e7bbwmnv1" path="res://Resources/Styles/Hud_Text_Style.tres" id="2_ryg35"] + +[sub_resource type="Gradient" id="Gradient_p43sh"] +colors = PackedColorArray(0.027451, 0.0941176, 0.129412, 1, 0.027451, 0.0941176, 0.129412, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_ahpdu"] +gradient = SubResource("Gradient_p43sh") + +[node name="IntroLogos" type="CanvasLayer"] +script = ExtResource("1_p43sh") +IntroScenePath = &"res://Scenes/Cutscenes/Intro.tscn" + +[node name="TextureRect" type="TextureRect" parent="."] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = SubResource("GradientTexture1D_ahpdu") + +[node name="CenterContainer" type="CenterContainer" parent="."] +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -80.0 +offset_right = 80.0 +offset_bottom = 144.0 +grow_horizontal = 2 + +[node name="TextureRect" type="TextureRect" parent="CenterContainer"] +layout_mode = 2 +texture = ExtResource("1_rm3c6") + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +anchors_preset = 7 +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +offset_left = -42.5 +offset_top = -40.0 +offset_right = 42.5 +grow_horizontal = 2 +grow_vertical = 0 + +[node name="Label" type="Label" parent="VBoxContainer"] +layout_mode = 2 +text = "This is a non official Touhou Project game. +Original By" +label_settings = ExtResource("2_ryg35") +horizontal_alignment = 1 + +[node name="Label2" type="Label" parent="VBoxContainer"] +layout_mode = 2 +text = "上海アリス幻樂団" +label_settings = ExtResource("2_ryg35") +horizontal_alignment = 1 diff --git a/Scripts/UI/IntroLogos.cs b/Scripts/UI/IntroLogos.cs new file mode 100644 index 00000000..2f8c253c --- /dev/null +++ b/Scripts/UI/IntroLogos.cs @@ -0,0 +1,38 @@ +using System.Threading.Tasks; +using Godot; + +namespace Cirno.Scripts.UI; + +public partial class IntroLogos : CanvasLayer +{ + [Export] + public float TransitionTime = 4f; + + [Export] + public StringName IntroScenePath; + + private bool _isTransitioning = false; + + public override void _Ready() + { + _ = AutoTransition(); + } + + public override void _Process(double delta) + { + if (_isTransitioning) return; + if (Input.IsAnythingPressed()) + { + _isTransitioning = true; + GlobalState.Instance.GotoScene(IntroScenePath); + } + } + + private async Task AutoTransition() + { + await Task.Delay((int)(TransitionTime * 1000)); + if (_isTransitioning) return; + _isTransitioning = true; + GlobalState.Instance.GotoScene(IntroScenePath); + } +} \ No newline at end of file diff --git a/Scripts/UI/IntroLogos.cs.uid b/Scripts/UI/IntroLogos.cs.uid new file mode 100644 index 00000000..73447a12 --- /dev/null +++ b/Scripts/UI/IntroLogos.cs.uid @@ -0,0 +1 @@ +uid://catf2cx0f8cnu diff --git a/Sprites/UI/MaddoLogo.aseprite b/Sprites/UI/MaddoLogo.aseprite new file mode 100644 index 00000000..ea8f8cef --- /dev/null +++ b/Sprites/UI/MaddoLogo.aseprite @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce5f44386690f0d45857661b6f9e33d30b512882911eebc4bba6fbcb674dcded +size 719 diff --git a/Sprites/UI/MaddoLogo.png b/Sprites/UI/MaddoLogo.png new file mode 100644 index 00000000..18a2aeb0 --- /dev/null +++ b/Sprites/UI/MaddoLogo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85ad1c3be705ced50a82976819db2ec5c038d1a67be4fe0f69f9036e9f848753 +size 897 diff --git a/Sprites/UI/MaddoLogo.png.import b/Sprites/UI/MaddoLogo.png.import new file mode 100644 index 00000000..530eed8f --- /dev/null +++ b/Sprites/UI/MaddoLogo.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dfncwtgc4ae6e" +path="res://.godot/imported/MaddoLogo.png-6a7091403e5eb0b53fa7f3e1e4cab1df.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/UI/MaddoLogo.png" +dest_files=["res://.godot/imported/MaddoLogo.png-6a7091403e5eb0b53fa7f3e1e4cab1df.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 diff --git a/project.godot b/project.godot index ac92a86d..94697eba 100644 --- a/project.godot +++ b/project.godot @@ -21,7 +21,7 @@ Settings/temporaryLogLifetime=5.0 [application] config/name="Cirno" -run/main_scene="uid://oaxftu6lytvv" +run/main_scene="uid://dew6axbejrusj" config/features=PackedStringArray("4.4", "C#", "GL Compatibility") config/icon="res://icon.svg"