class_name Spawner extends Marker2D

signal finished;
@export var spawn_instance : PackedScene;

func spawn():
	var entity : Entity = spawn_instance.instantiate()
	get_tree().current_scene.add_child(entity)
	entity.global_position = global_position
	entity.scale.y = 5
	create_tween().tween_property(entity, "scale:y", 1, 0.2)
	entity.died.connect(finished.emit)
