mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-12 22:57:13 +08:00
feat: 添加掉落物功能,更新饲料和物品显示,重构相关UI组件
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://bykwevnv7keeh"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://bykwevnv7keeh"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Structs/Feed.gd" id="1_2ea75"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwwpkn4q07ja2" path="res://icon.svg" id="2_b6x2s"]
|
||||
[ext_resource type="Theme" uid="uid://dhvs6urgf6jr5" path="res://themes/main.tres" id="2_lvrpo"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_n2ewr"]
|
||||
content_margin_left = 30.0
|
||||
@@ -29,6 +30,12 @@ script = ExtResource("1_2ea75")
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 20
|
||||
|
||||
[node name="selectBtn" type="Button" parent="container"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme = ExtResource("2_lvrpo")
|
||||
text = "确定"
|
||||
|
||||
[node name="info" type="VBoxContainer" parent="container"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://d3qojeqa3difn"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Statemachine/FullscreenPanelBase.gd" id="1_8e8nf"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mjt0u"]
|
||||
bg_color = Color(0, 0, 0, 0.5)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_76r7u"]
|
||||
length = 0.001
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:modulate:a")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(1, -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(".:position:y")
|
||||
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_xdama"]
|
||||
resource_name = "show"
|
||||
length = 0.5
|
||||
step = 0.1
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:modulate:a")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0),
|
||||
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 0.5)
|
||||
}
|
||||
tracks/1/type = "bezier"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath(".:position:y")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, -500, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 0.5)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_kd0tm"]
|
||||
resource_name = "show"
|
||||
length = 0.5
|
||||
step = 0.1
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:modulate:a")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 0.5)
|
||||
}
|
||||
tracks/1/type = "bezier"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath(".:position:y")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0),
|
||||
"points": PackedFloat32Array(-500, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 0.5)
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ocj0r"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_76r7u"),
|
||||
"hide": SubResource("Animation_xdama"),
|
||||
"show": SubResource("Animation_kd0tm")
|
||||
}
|
||||
|
||||
[node name="FullscreenPanelBase" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_8e8nf")
|
||||
|
||||
[node name="content" type="PanelContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_mjt0u")
|
||||
|
||||
[node name="wrapper" type="VBoxContainer" parent="content"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="animator" type="AnimationPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_ocj0r")
|
||||
}
|
||||
@@ -34,6 +34,8 @@ animations = [{
|
||||
script = ExtResource("2_r6bub")
|
||||
cooldownUnit = 200.0
|
||||
displayName = "小鸡"
|
||||
drops = Array[int]([0, 1])
|
||||
dropCounts = Array[Vector2]([Vector2(10, 20), Vector2(7, 14)])
|
||||
|
||||
[node name="hurt" parent="sounds" index="2"]
|
||||
stream = ExtResource("3_ik1xf")
|
||||
|
||||
@@ -34,6 +34,8 @@ radius = 40.0
|
||||
[node name="Hen" instance=ExtResource("1_twxai")]
|
||||
script = ExtResource("2_8u5a0")
|
||||
cooldownUnit = 500.0
|
||||
drops = Array[int]([0, 1])
|
||||
dropCounts = Array[Vector2]([Vector2(4, 8), Vector2(2, 6)])
|
||||
|
||||
[node name="hurt" parent="sounds" index="2"]
|
||||
stream = ExtResource("3_ojyt7")
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://1n28ji5sl6bx"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://d3qojeqa3difn" path="res://components/Abstracts/FullscreenPanelBase.tscn" id="1_1wmro"]
|
||||
[ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="2_ae402"]
|
||||
|
||||
[node name="MakeFeed" instance=ExtResource("1_1wmro")]
|
||||
|
||||
[node name="wrapper" parent="content" index="0"]
|
||||
theme_override_constants/separation = 50
|
||||
|
||||
[node name="tips" type="VBoxContainer" parent="content/wrapper" index="0"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="title" type="RichTextLabel" parent="content/wrapper/tips" index="0"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
theme_override_font_sizes/bold_font_size = 30
|
||||
bbcode_enabled = true
|
||||
text = "[b]天降鸡饲料[/b]"
|
||||
fit_content = true
|
||||
autowrap_mode = 0
|
||||
|
||||
[node name="tip" type="HBoxContainer" parent="content/wrapper/tips" index="1"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="select" type="RichTextLabel" parent="content/wrapper/tips/tip" index="0"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
bbcode_enabled = true
|
||||
text = "可选择"
|
||||
fit_content = true
|
||||
autowrap_mode = 0
|
||||
|
||||
[node name="count" type="RichTextLabel" parent="content/wrapper/tips/tip" index="1"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
bbcode_enabled = true
|
||||
text = "1"
|
||||
fit_content = true
|
||||
autowrap_mode = 0
|
||||
|
||||
[node name="feed" type="RichTextLabel" parent="content/wrapper/tips/tip" index="2"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
bbcode_enabled = true
|
||||
text = "项增益"
|
||||
fit_content = true
|
||||
autowrap_mode = 0
|
||||
|
||||
[node name="feedcards" type="HBoxContainer" parent="content/wrapper" index="1"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 30
|
||||
alignment = 1
|
||||
|
||||
[node name="FeedCard" parent="content/wrapper/feedcards" index="0" instance=ExtResource("2_ae402")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="FeedCard2" parent="content/wrapper/feedcards" index="1" instance=ExtResource("2_ae402")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="FeedCard3" parent="content/wrapper/feedcards" index="2" instance=ExtResource("2_ae402")]
|
||||
layout_mode = 2
|
||||
@@ -1,8 +1,9 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dfwg750a47ggx"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://dfwg750a47ggx"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://ofpg5s3j7esv" path="res://components/UI/BossBar.tscn" id="1_2pe58"]
|
||||
[ext_resource type="Script" path="res://scripts/Statemachine/UIState.gd" id="1_f00a6"]
|
||||
[ext_resource type="PackedScene" uid="uid://bbm8l3hr4ihar" path="res://components/UI/ItemShow.tscn" id="3_o2oi4"]
|
||||
[ext_resource type="PackedScene" uid="uid://1n28ji5sl6bx" path="res://components/Scenes/FullscreenPanels/MakeFeed.tscn" id="4_kkki3"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xmgs2"]
|
||||
content_margin_left = 10.0
|
||||
@@ -49,9 +50,23 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_xmgs2")
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="ItemShow" parent="root/items/container" instance=ExtResource("3_o2oi4")]
|
||||
[node name="baseball" parent="root/items/container" instance=ExtResource("3_o2oi4")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ItemShow2" parent="root/items/container" instance=ExtResource("3_o2oi4")]
|
||||
[node name="basketball" parent="root/items/container" instance=ExtResource("3_o2oi4")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
type = 1
|
||||
|
||||
[node name="fullscreenPanels" type="Control" parent="root"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="MakeFeed" parent="root/fullscreenPanels" instance=ExtResource("4_kkki3")]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ar00p"]
|
||||
content_margin_left = 10.0
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_55nrw"]
|
||||
font_size = 14
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_esyuk"]
|
||||
font_size = 12
|
||||
font_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="BossBar" type="Control"]
|
||||
@@ -48,16 +48,19 @@ layout_mode = 2
|
||||
[node name="name" type="Label" parent="health/panel/label"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 8
|
||||
text = "BossName"
|
||||
label_settings = SubResource("LabelSettings_55nrw")
|
||||
label_settings = SubResource("LabelSettings_esyuk")
|
||||
|
||||
[node name="value" type="Label" parent="health/panel/label"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 8
|
||||
text = "percent"
|
||||
label_settings = SubResource("LabelSettings_55nrw")
|
||||
label_settings = SubResource("LabelSettings_esyuk")
|
||||
|
||||
[node name="percent" type="Label" parent="health/panel/label"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 8
|
||||
text = "%"
|
||||
label_settings = SubResource("LabelSettings_55nrw")
|
||||
label_settings = SubResource("LabelSettings_esyuk")
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cxcvc1rjvm8i2"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Statemachine/ItemDropped.gd" id="1_v2djl"]
|
||||
[ext_resource type="Texture2D" uid="uid://bks8jmctleina" path="res://resources/items/baseball.svg" id="2_4hl42"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_7lt1c"]
|
||||
radius = 7.0
|
||||
|
||||
[node name="ItemDropped" type="RigidBody2D"]
|
||||
script = ExtResource("1_v2djl")
|
||||
|
||||
[node name="texture" type="Sprite2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
scale = Vector2(0.25, 0.25)
|
||||
texture = ExtResource("2_4hl42")
|
||||
|
||||
[node name="hitbox" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_7lt1c")
|
||||
Reference in New Issue
Block a user