feat: 1. 添加武器位置,1-6
2. 添加武器容器 3. 添加敌人的Hurtbox
This commit is contained in:
@@ -13,6 +13,8 @@ position = Vector2(21, 1)
|
||||
|
||||
[node name="HitboxComponent" parent="Sprite2D" index="0" unique_id=151235566 instance=ExtResource("2_gq287")]
|
||||
scale = Vector2(2, 2)
|
||||
collision_layer = 16
|
||||
collision_mask = 8
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Sprite2D/HitboxComponent" index="0" unique_id=1064980236]
|
||||
z_index = 1
|
||||
|
||||
@@ -17,8 +17,8 @@ func _ready() -> void:
|
||||
atk_start_pos = sprite_2d.position
|
||||
|
||||
|
||||
func setup_weapon(data: ItemWeapon) -> void:
|
||||
self.data = data
|
||||
func setup_weapon(_data: ItemWeapon) -> void:
|
||||
self.data = _data
|
||||
collision.shape.radius = data.stats.max_range
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ radius = 150.0
|
||||
script = ExtResource("1_v4xn6")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1011668514]
|
||||
z_index = 1
|
||||
scale = Vector2(0.5, 0.5)
|
||||
texture = ExtResource("2_uvw4m")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user