One Shot Component - Quillraven/Fleks GitHub Wiki
This feature was added with issue 178.
A one-shot component (or tag) is a component that gets automatically removed at the end of a frame (=world.update call). This can be useful if you use components to dispatch events or tag an entity for specific systems for a single frame.
The configuration of such components is done in the World configuration block:
configureWorld {
oneShotComponents(MyComp1, MyTag1)
}
What this does is that Fleks automatically adds its own OneShotComponentSystem as last system of execution when calling world.update. This system then removes all components/tags of an entity that got registered via the oneShotComponents call in the configureWorld section.