So the other modules have a static reference because they are Autoloads. But when I need access to the game, I have to manually get the reference.
Some thoughts:
This could be referenced in a GSGModule node, that we could then derive the other module heads from that. Probably the easiest way to do it, but not the cleanest.
Otherwise, it could be restructured so that Game references the other modules and nothing references Game directly. This seems backward, though, because game is the one module that is always guaranteed to exist. Maybe we can invert the dependency and create an intermediate service class.
So the other modules have a static reference because they are Autoloads. But when I need access to the game, I have to manually get the reference.
Some thoughts: This could be referenced in a GSGModule node, that we could then derive the other module heads from that. Probably the easiest way to do it, but not the cleanest.
Otherwise, it could be restructured so that Game references the other modules and nothing references Game directly. This seems backward, though, because game is the one module that is always guaranteed to exist. Maybe we can invert the dependency and create an intermediate service class.