Yeah, those were the fixes I had to apply to get the settings working. At least C# will typically inform me of silly mistakes when redeclaring variables in child blocks.
There shouldn't be any cases in my own use of the system where the settings are modified in the component's Initialize function. The settings initialization should all occur within the LoadSettings crap, even when it is just to set them to the default values.
The Initialize\Dispose system should really just be for runtime based computations. If the settings are known before the Yelo game state begins, then the initialize code can perform any game changes based on variable settings once and should treat all setting values as read only. It's not until the Yelo update state begins where it should be assumed safe to change the values of the settings.
Could a better system been created? Of course (think XML). I really just wanted to keep a very simple system in place and decided to reuse the old Battery code with some adjustments in code flow and such. Allowed more time to be spent on other things
Bookmarks