chore: 初始化游戏项目基础框架与菜单系统
新增了基础菜单抽象类、主题配置、开场与主菜单场景,添加了所需的资源文件与项目配置,完善了项目基础结构
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
[gd_scene format=3 uid="uid://cpaa0vcxwar3i"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bd1nba4oijmgp" path="res://scripts/Statemachine/Abstract/BaseMenu.gd" id="1_x5ano"]
|
||||
|
||||
[node name="Menu" type="Control" unique_id=1823905463]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_x5ano")
|
||||
|
||||
[node name="animator" type="AnimationPlayer" parent="." unique_id=204407114]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="background" type="ColorRect" parent="." unique_id=1236798550]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="content" type="Control" parent="." unique_id=1993984611]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
@@ -0,0 +1,112 @@
|
||||
[gd_scene format=3 uid="uid://3mu73nyxqj7l"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cpaa0vcxwar3i" path="res://components/Abstracts/BaseMenu.tscn" id="1_2cmx8"]
|
||||
[ext_resource type="VideoStream" uid="uid://cnnnx6f2j5npp" path="res://resources/animation/background.ogv" id="2_puagb"]
|
||||
[ext_resource type="Texture2D" uid="uid://d2ikr66k3hpsm" path="res://resources/logo/losing-mind-invert.png" id="3_puagb"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_5ifwo"]
|
||||
length = 0.001
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("content/logo:offset_left")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(-100, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
tracks/1/type = "bezier"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("content/logo:modulate:a")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_puagb"]
|
||||
resource_name = "enter"
|
||||
step = 0.05
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("content/logo:offset_left")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 2),
|
||||
"points": PackedFloat32Array(-200, 0, 0, 0, 0, 0, -0.15, 0, 0, 0),
|
||||
"times": PackedFloat32Array(0, 0.25)
|
||||
}
|
||||
tracks/1/type = "bezier"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("content/logo:modulate:a")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"handle_modes": PackedInt32Array(2, 2),
|
||||
"points": PackedFloat32Array(0, 0, 0, 0, 0, 1, -0.15, 0, 0, 0),
|
||||
"times": PackedFloat32Array(0, 0.25)
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5ifwo"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_5ifwo"),
|
||||
&"enter": SubResource("Animation_puagb")
|
||||
}
|
||||
|
||||
[node name="MainMenu" unique_id=1823905463 instance=ExtResource("1_2cmx8")]
|
||||
backgroundColor = Color(1, 1, 1, 0)
|
||||
|
||||
[node name="animator" parent="." index="0" unique_id=204407114]
|
||||
libraries/ = SubResource("AnimationLibrary_5ifwo")
|
||||
|
||||
[node name="background" parent="." index="1" unique_id=1236798550]
|
||||
color = Color(1, 1, 1, 0)
|
||||
|
||||
[node name="background" type="VideoStreamPlayer" parent="content" parent_id_path=PackedInt32Array(1993984611) index="0" unique_id=448862813]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
stream = ExtResource("2_puagb")
|
||||
autoplay = true
|
||||
expand = true
|
||||
loop = true
|
||||
|
||||
[node name="logo" type="TextureRect" parent="content" parent_id_path=PackedInt32Array(1993984611) index="1" unique_id=1126334390]
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.05
|
||||
anchor_top = 0.1
|
||||
anchor_right = 0.05
|
||||
anchor_bottom = 0.1
|
||||
offset_left = -100.0
|
||||
offset_right = 592.0
|
||||
offset_bottom = 176.0
|
||||
texture = ExtResource("3_puagb")
|
||||
stretch_mode = 4
|
||||
|
||||
[node name="buttons" type="VBoxContainer" parent="content" parent_id_path=PackedInt32Array(1993984611) index="2" unique_id=2029610714]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.05
|
||||
anchor_top = 0.95
|
||||
anchor_right = 0.05
|
||||
anchor_bottom = 0.95
|
||||
offset_top = -40.0
|
||||
offset_right = 40.0
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="startGame" type="Button" parent="content/buttons" index="0" unique_id=1946692760]
|
||||
layout_mode = 2
|
||||
text = "开始游戏"
|
||||
@@ -0,0 +1,147 @@
|
||||
[gd_scene format=3 uid="uid://drfuhbhan42q8"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cpaa0vcxwar3i" path="res://components/Abstracts/BaseMenu.tscn" id="1_ciyig"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1jdhinrkkif4" path="res://resources/logo/studio.jpg" id="2_wnodh"]
|
||||
[ext_resource type="Texture2D" uid="uid://84tagbhaf8bi" path="res://resources/logo/losing-mind.png" id="3_ndv0w"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_827xn"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("content/studioLogo:modulate:a")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [0.0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("content/gameLogo:modulate:a")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [0.0]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath(".:modulate:a")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [1.0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_bv3ut"]
|
||||
resource_name = "spawn"
|
||||
length = 12.0
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("content/studioLogo:modulate:a")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1, 4, 5),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, 1.0, 1.0, 0.0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("content/gameLogo:modulate:a")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 6, 7, 10, 11),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, 0.0, 1.0, 1.0, 0.0]
|
||||
}
|
||||
tracks/2/type = "method"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath(".")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(12),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"values": [{
|
||||
"args": [],
|
||||
"method": &"queue_free"
|
||||
}]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath(".:modulate:a")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0, 11, 12),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [1.0, 1.0, 0.0]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_wnodh"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_827xn"),
|
||||
&"spawn": SubResource("Animation_bv3ut")
|
||||
}
|
||||
|
||||
[node name="StartMenu" unique_id=1823905463 instance=ExtResource("1_ciyig")]
|
||||
|
||||
[node name="animator" parent="." index="0" unique_id=204407114]
|
||||
libraries/ = SubResource("AnimationLibrary_wnodh")
|
||||
autoplay = &"spawn"
|
||||
|
||||
[node name="background" type="ColorRect" parent="content" parent_id_path=PackedInt32Array(1993984611) index="0" unique_id=2115224193]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="studioLogo" type="TextureRect" parent="content" parent_id_path=PackedInt32Array(1993984611) index="1" unique_id=900485145]
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
scale = Vector2(0.5, 0.5)
|
||||
pivot_offset_ratio = Vector2(0.5, 0.5)
|
||||
texture = ExtResource("2_wnodh")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="gameLogo" type="TextureRect" parent="content" parent_id_path=PackedInt32Array(1993984611) index="2" unique_id=1468758261]
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
scale = Vector2(0.5, 0.5)
|
||||
pivot_offset_ratio = Vector2(0.5, 0.5)
|
||||
texture = ExtResource("3_ndv0w")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
Reference in New Issue
Block a user