feat: 添加Hitbox和Hurtbox,添加敌人和玩家之间的碰撞

This commit is contained in:
luke358
2026-05-18 14:55:43 +08:00
parent 67ea3f2d42
commit 2060719f4e
10 changed files with 117 additions and 3 deletions
+3
View File
@@ -2,6 +2,7 @@
[ext_resource type="Texture2D" uid="uid://devt2xbk78rej" path="res://assets/sprites/shadow.png" id="1_fvc8g"]
[ext_resource type="Script" uid="uid://cwf3afjy6t6rg" path="res://scenes/unit/unit.gd" id="1_vh40f"]
[ext_resource type="PackedScene" uid="uid://bkyyic3okyjxx" path="res://scenes/components/hurtbox_component.tscn" id="3_vh40f"]
[sub_resource type="Animation" id="Animation_bhlit"]
length = 0.001
@@ -244,3 +245,5 @@ position = Vector2(0, -61)
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=619019243]
libraries/ = SubResource("AnimationLibrary_w7udy")
[node name="HurtboxComponent" parent="." unique_id=1155790880 instance=ExtResource("3_vh40f")]