Added piercing
This commit is contained in:
@@ -63,4 +63,7 @@ func _on_body_entered(body: Node2D) -> void:
|
|||||||
var health_component : Health = body.find_child("Health")
|
var health_component : Health = body.find_child("Health")
|
||||||
if health_component and health_component.has_method("apply_damage"):
|
if health_component and health_component.has_method("apply_damage"):
|
||||||
health_component.apply_damage(damage)
|
health_component.apply_damage(damage)
|
||||||
queue_free()
|
if piercing == 0:
|
||||||
|
queue_free()
|
||||||
|
else:
|
||||||
|
piercing -= 1
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ radius = 1.0
|
|||||||
script = ExtResource("2_hbgoq")
|
script = ExtResource("2_hbgoq")
|
||||||
damage = SubResource("Resource_ndegg")
|
damage = SubResource("Resource_ndegg")
|
||||||
speed = 600
|
speed = 600
|
||||||
|
piercing = 1
|
||||||
|
|
||||||
[node name="Sprite2D" parent="." index="0"]
|
[node name="Sprite2D" parent="." index="0"]
|
||||||
texture = SubResource("PlaceholderTexture2D_hbgoq")
|
texture = SubResource("PlaceholderTexture2D_hbgoq")
|
||||||
|
|||||||
Reference in New Issue
Block a user