Sets the functional hooks for listening on the lifecycle of
a component i.e addition, insertion and removal.
The component needs to be registered
on a world before its hooks can be set.
Example
//a component classA {}
functionadded(entity:Entity,world:World){ console.log(`Entity {${entity}} with component A added`) } functioninserted(entity:Entity,world:World){ console.log(`Component A inserted into entity {${entity}}` ) }
functionremoved(entity:Entity,world:World){ console.log(`Entity {${entity}} with component A removed`) }
Sets the functional hooks for listening on the lifecycle of a component i.e addition, insertion and removal. The component needs to be registered on a world before its hooks can be set.
Example