feat: them skeletons man + reload after dancing
This commit is contained in:
@ -7,6 +7,7 @@ class_name Damageable
|
||||
var active = true
|
||||
|
||||
signal got_hit
|
||||
signal die
|
||||
|
||||
func set_active(new_active: bool):
|
||||
active = new_active
|
||||
@ -16,5 +17,10 @@ func damage(value: int = 0, direction: Vector2 = Vector2.UP):
|
||||
return
|
||||
|
||||
health -= value
|
||||
if health <= 0:
|
||||
die.emit()
|
||||
return
|
||||
|
||||
get_parent().velocity = hitback_velocity * direction
|
||||
got_hit.emit()
|
||||
|
||||
|
@ -5,4 +5,5 @@
|
||||
[node name="Hitbox" type="Area2D"]
|
||||
script = ExtResource("1_n3l2p")
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="_on_body_entered"]
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
|
Reference in New Issue
Block a user