mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(Shield): 添加碰撞优先级和调整子节点位置
为Shield组件添加collision_priority属性并调整staticBackground和hurtbox节点的位置,以改进碰撞检测和视觉效果
This commit is contained in:
@@ -34,12 +34,16 @@ shader_parameter/alpha = 0.2999999932944
|
|||||||
radius = 150.0
|
radius = 150.0
|
||||||
|
|
||||||
[node name="Sheild" instance=ExtResource("1_xnsmi")]
|
[node name="Sheild" instance=ExtResource("1_xnsmi")]
|
||||||
|
collision_priority = 2.0
|
||||||
script = ExtResource("2_1x6ja")
|
script = ExtResource("2_1x6ja")
|
||||||
attraction = 0.0
|
attraction = 0.0
|
||||||
|
|
||||||
[node name="texture" parent="." index="3"]
|
[node name="texture" parent="." index="3"]
|
||||||
sprite_frames = SubResource("SpriteFrames_1x6ja")
|
sprite_frames = SubResource("SpriteFrames_1x6ja")
|
||||||
|
|
||||||
|
[node name="staticBackground" parent="texture" index="0"]
|
||||||
|
position = Vector2(0, 50)
|
||||||
|
|
||||||
[node name="circle" type="Node2D" parent="texture/staticBackground" index="0"]
|
[node name="circle" type="Node2D" parent="texture/staticBackground" index="0"]
|
||||||
material = SubResource("ShaderMaterial_ddbxg")
|
material = SubResource("ShaderMaterial_ddbxg")
|
||||||
script = ExtResource("4_cg4js")
|
script = ExtResource("4_cg4js")
|
||||||
@@ -54,6 +58,9 @@ size = Vector2(300, 300)
|
|||||||
color = Color(1, 0.76694965, 0, 1)
|
color = Color(1, 0.76694965, 0, 1)
|
||||||
metadata/_custom_type_script = "uid://cgb01lelfg73p"
|
metadata/_custom_type_script = "uid://cgb01lelfg73p"
|
||||||
|
|
||||||
|
[node name="hurtbox" parent="texture" index="2"]
|
||||||
|
position = Vector2(0, 50)
|
||||||
|
|
||||||
[node name="hitbox" parent="texture/hurtbox" index="0"]
|
[node name="hitbox" parent="texture/hurtbox" index="0"]
|
||||||
shape = SubResource("CircleShape2D_ddbxg")
|
shape = SubResource("CircleShape2D_ddbxg")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user