Open delaneyj opened 6 months ago
Hi @delaneyj!
thanks for coming along!
You can easily do this yourself, as the systems are accessible as the resource Systems
.
About like this (not tested):
func (s *MySys) Initialize(world *ecs.World) {
// Do your stuff...
sysRes := generic.NewResource[model.Systems](world)
systems := sysRes.Get()
systems.RemoveSystem(s)
}
Right, I just thought it might be clearer to have a OneShot intereface that only has Init and a System interface extends that interface to be more explicit and to auto handle to removal.
Well, ok, this is worth a consideration.
Would be nice for setup to have some systems run initialize then remove self