feat: add particles to the slime death animation;

This commit is contained in:
2026-09-25 08:11:24 +02:00
parent 87fe48ef74
commit 382452f256
2 changed files with 23 additions and 0 deletions
+4
View File
@@ -38,6 +38,10 @@ func take_damage():
var original_color: Color = Color(1, 1, 1)
modulate = original_color
if (HP <= 0):
$AnimatedSprite2D.hide()
$GPUParticles2D.emitting = true
await get_tree().create_timer(1).timeout
$CollisionShape2D.set_deferred("disabled", true)
queue_free()
func _on_player_detect_area_body_entered(body):