Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove cast to Game in AudioSystem #472
Added GameSettings to the services and then removed the cast to Game in AudioSystem. This is beginning the work of decoupling the Systems from Game to allow for a Headless Game to be created.
As above, just added GameSettings to the Services so AudioSystem (and other classes as needed) can access them without casting to Game.
In AudioSystem specifically, the only reference to Game is to get the settings. Other areas such as SyncScript would still be able to access the settings directly.
I did not add GameSettings to IGame because of it being unavailable to that project. Another possibility would be to call Content.Load in Audio system and then unload after the settings have been used.
None - if needed I can create an issue as I go about decoupling systems if this is even a path that we want to take.
Motivation and Context
Decoupling the classes will help allow for a Headless game which will be needed for using the engine as a dedicated server. Specifically, in this case, the only coupling is to load the settings and this was the most straight forward way to break that coupling.
Types of changes
@xen2 It is even better to set it on the