From 92624c2a2e33403cf148bf16ab179bdcf844b90b 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: Sat, 2 May 2026 18:16:20 +0800 Subject: [PATCH] =?UTF-8?q?refactor(EnergyBlock):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E5=B9=B6=E8=B0=83=E6=95=B4=E7=A2=B0=E6=92=9E?= =?UTF-8?q?=E4=BD=93=E5=B0=BA=E5=AF=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将能量块图标替换为新的SVG图标 - 调整静态背景的缩放比例 - 为伤害区域添加矩形碰撞体 --- components/Characters/EnergyBlock.tscn | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/components/Characters/EnergyBlock.tscn b/components/Characters/EnergyBlock.tscn index 47eb3a2..861adba 100644 --- a/components/Characters/EnergyBlock.tscn +++ b/components/Characters/EnergyBlock.tscn @@ -2,7 +2,7 @@ [ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_n2ng1"] [ext_resource type="Script" uid="uid://du30qanswie6y" path="res://scripts/Contents/Characters/EnergyBlock.gd" id="2_h3ykr"] -[ext_resource type="Texture2D" uid="uid://bm64qkwl8qeqo" path="res://resources/characters/enregy-block/40code.png" id="3_v78o6"] +[ext_resource type="Texture2D" uid="uid://dwwpkn4q07ja2" path="res://icon.svg" id="3_v78o6"] [sub_resource type="SpriteFrames" id="SpriteFrames_8do1r"] animations = [{ @@ -17,6 +17,9 @@ animations = [{ "speed": 5.0 }] +[sub_resource type="RectangleShape2D" id="RectangleShape2D_8do1r"] +size = Vector2(112, 112) + [node name="EnergyBlock" unique_id=247617339 instance=ExtResource("1_n2ng1")] script = ExtResource("2_h3ykr") displayName = "稻草人" @@ -28,8 +31,11 @@ frame_progress = 0.31093365 [node name="staticBackground" parent="texture" index="0"] position = Vector2(0, -1.0000038) -scale = Vector2(0.49728185, 0.49728185) +scale = Vector2(0.8514976, 0.8514976) texture = ExtResource("3_v78o6") +[node name="hitbox" parent="texture/hurtbox" index="0"] +shape = SubResource("RectangleShape2D_8do1r") + [node name="statebar" parent="." index="4"] position = Vector2(0, -119)