From d9a72f3e08bf768aca07b2d8da87d507ccce9df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=A8=E8=90=BD=E5=9F=BA=E5=9B=B4=E8=99=BE?= <3161880837@qq.com> Date: Thu, 28 Aug 2025 10:18:29 +0800 Subject: [PATCH] =?UTF-8?q?feat(Feed):=20=E6=9B=B4=E6=96=B0=E5=B9=B8?= =?UTF-8?q?=E8=BF=90=E7=AD=BE=E8=AF=AD=E9=A5=BC=E5=B1=9E=E6=80=A7=E5=92=8C?= =?UTF-8?q?=E6=8E=89=E8=90=BD=E7=89=A9=E5=93=81=E7=B2=92=E5=AD=90=E6=95=88?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为幸运签语饼添加新字段并调整属性值 - 在ItemDropped场景中添加粒子效果增强视觉表现 - 修复generateCardByQuality方法中weight调用参数缺失问题 --- components/Feeds/LuckyCookie.tscn | 5 +-- components/UI/ItemDropped.tscn | 50 ++++++++++++++++++++++++++++- scripts/Contents/Panels/MakeFeed.gd | 2 +- scripts/Tools/FieldStore.gd | 2 +- 4 files changed, 54 insertions(+), 5 deletions(-) diff --git a/components/Feeds/LuckyCookie.tscn b/components/Feeds/LuckyCookie.tscn index 4731cf9..372fe95 100644 --- a/components/Feeds/LuckyCookie.tscn +++ b/components/Feeds/LuckyCookie.tscn @@ -7,8 +7,8 @@ avatarTexture = ExtResource("2_or0st") displayName = "幸运签语饼" quality = 2 -fields = Array[int]([14, 4, 6]) -fieldValues = Array[float]([0.1, 0.07, 0.12]) +fields = Array[int]([14, 4, 6, 18]) +fieldValues = Array[float]([0.1, 0.07, 0.12, 3.0]) costs = Array[int]([0, 1, 2]) costCounts = Array[int]([200, 75, 1]) @@ -17,3 +17,4 @@ texture = ExtResource("2_or0st") [node name="name" parent="container/info" index="1"] displayName = "幸运签语饼" +quality = 2 diff --git a/components/UI/ItemDropped.tscn b/components/UI/ItemDropped.tscn index a95047e..7034aac 100644 --- a/components/UI/ItemDropped.tscn +++ b/components/UI/ItemDropped.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=4 format=3 uid="uid://cxcvc1rjvm8i2"] +[gd_scene load_steps=13 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"] @@ -6,8 +6,51 @@ [sub_resource type="CircleShape2D" id="CircleShape2D_7lt1c"] radius = 2.0 +[sub_resource type="Curve" id="Curve_11h7l"] +_data = [Vector2(0, 0.5), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_u4ger"] +curve = SubResource("Curve_11h7l") + +[sub_resource type="Curve" id="Curve_h22hm"] +min_value = -1.0 +_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, -1), 0.0, 0.0, 0, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_orbge"] +curve = SubResource("Curve_h22hm") + +[sub_resource type="Gradient" id="Gradient_2h3cl"] +colors = PackedColorArray(0.44, 0.44, 0.44, 1, 1, 1, 1, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_5p7rs"] +gradient = SubResource("Gradient_2h3cl") + +[sub_resource type="Curve" id="Curve_pp2gs"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_1ot48"] +curve = SubResource("Curve_pp2gs") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_jfwfg"] +particle_flag_disable_z = true +emission_shape = 1 +emission_sphere_radius = 15.0 +angle_min = 1.07288e-05 +angle_max = 720.0 +angle_curve = SubResource("CurveTexture_orbge") +gravity = Vector3(0, 0, 0) +scale_min = 5.0 +scale_max = 10.0 +scale_curve = SubResource("CurveTexture_1ot48") +color_initial_ramp = SubResource("GradientTexture1D_5p7rs") +alpha_curve = SubResource("CurveTexture_u4ger") + [node name="ItemDropped" type="RigidBody2D"] script = ExtResource("1_v2djl") +metadata/_edit_vertical_guides_ = [15.0, -15.0] [node name="texture" type="Sprite2D" parent="."] unique_name_in_owner = true @@ -16,3 +59,8 @@ texture = ExtResource("2_4hl42") [node name="hitbox" type="CollisionShape2D" parent="."] shape = SubResource("CircleShape2D_7lt1c") + +[node name="particles" type="GPUParticles2D" parent="."] +amount = 50 +process_material = SubResource("ParticleProcessMaterial_jfwfg") +lifetime = 3.0 diff --git a/scripts/Contents/Panels/MakeFeed.gd b/scripts/Contents/Panels/MakeFeed.gd index 9b024fa..9c5a544 100644 --- a/scripts/Contents/Panels/MakeFeed.gd +++ b/scripts/Contents/Panels/MakeFeed.gd @@ -63,7 +63,7 @@ func generateCardByQuality(): var feeds = [] for i in range(len(avaliableFeeds.get_children())): var feed = avaliableFeeds.get_children()[i] as Feed - for j in range(feed.nameLabel.weight()): + for j in range(feed.nameLabel.weight(UIState.player)): feeds.append(i) var result = [] for i in range(UIState.player.fields[FieldStore.Entity.FEED_COUNT_SHOW]): diff --git a/scripts/Tools/FieldStore.gd b/scripts/Tools/FieldStore.gd index 463ff70..d58ddb5 100644 --- a/scripts/Tools/FieldStore.gd +++ b/scripts/Tools/FieldStore.gd @@ -77,7 +77,7 @@ static var entityApplier = { entity.inventoryMax[ItemStore.ItemType.APPLE] += value , Entity.EXTRA_BULLET_COUNT: func(entity, value): - entity.fields[Entity.OFFSET_SHOOT] += value * 2 + entity.fields[Entity.OFFSET_SHOOT] += value * 5 , }