You can create separate component for every kind of spawned entities but it's not practial due to archetype fragmentation.
Second approach can be commented code. It's gives good flexibility inchoosing entity, but it limits to one entity.
Instead of entity it can be array of templates which is good solution, but if possibilities is known at time of game development it
can be simply index/enum for type of spawn. Bad thing about this solution is problem witch merging multiple spawning types during
gameplay, i.e. giving buff which cast firebols upon death.
You can create separate component for every kind of spawned entities but it's not practial due to archetype fragmentation. Second approach can be commented code. It's gives good flexibility inchoosing entity, but it limits to one entity. Instead of entity it can be array of templates which is good solution, but if possibilities is known at time of game development it can be simply index/enum for type of spawn. Bad thing about this solution is problem witch merging multiple spawning types during gameplay, i.e. giving buff which cast firebols upon death.