CSpawnUponDeath

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.

Members

Enums

Type
enum Type
Undocumented in source.

Mixins

__anonymous
mixin ECS.Component
Undocumented in source.

Variables

type
Type type;
Undocumented in source.

Mixed In Members

From mixin ECS.Component

ref_
deprecated ComponentRef ref_()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta