Closed rhpenguins closed 3 years ago
Ah the early-corona days! Hope you are doing ok in 2021.
It needs to be injected into other systems, which is why it is implemented this way. You are correct it is a bit of a wrinkle in the design but for backwards compatibility we've left managers like this.
In the wiki on serializing an world instance to JSON using libGDX, it gives this following example:
However, if the job of the manager is just to serialize the world when it is called, why does it need to be a base system? In the source code for it https://github.com/junkdog/artemis-odb/blob/develop/artemis-serialization/artemis-serializer/src/main/java/com/artemis/managers/WorldSerializationManager.java#L22, it leaves the overriden method
processSystem()
empty anyway.Does anyone know why it needs to be registered as a system? The coupling has led to some messy code in my project, and it just doesn't seem logical to me.