mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-09 10:55:54 +00:00
Intro logo skip
This commit is contained in:
parent
48c572131d
commit
cf708c58f4
7 changed files with 141 additions and 1 deletions
61
Scenes/HUD/IntroLogos.tscn
Normal file
61
Scenes/HUD/IntroLogos.tscn
Normal file
|
|
@ -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
|
||||
38
Scripts/UI/IntroLogos.cs
Normal file
38
Scripts/UI/IntroLogos.cs
Normal file
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
1
Scripts/UI/IntroLogos.cs.uid
Normal file
1
Scripts/UI/IntroLogos.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://catf2cx0f8cnu
|
||||
BIN
Sprites/UI/MaddoLogo.aseprite
(Stored with Git LFS)
Normal file
BIN
Sprites/UI/MaddoLogo.aseprite
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Sprites/UI/MaddoLogo.png
(Stored with Git LFS)
Normal file
BIN
Sprites/UI/MaddoLogo.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Sprites/UI/MaddoLogo.png.import
Normal file
34
Sprites/UI/MaddoLogo.png.import
Normal file
|
|
@ -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
|
||||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue