clowder/tscn/die.gd

11 lines
213 B
GDScript3
Raw Permalink Normal View History

2024-03-06 22:05:35 +01:00
extends CharacterBody2D
func die():
var emitter = preload("res://tscn/enemyhitbox.tscn").instantiate()
get_parent().add_child(emitter)
emitter.position = self.position
emitter.emitting = true
queue_free()