At the moment I am trying to use an integer to declare whether or not a setting is enabled or disabled, the issue that I am facing is trying to use the variable in another class so as that I can transfer the setting to be used in the actual game. My question is how can I do this? If you have an answer could you also give an example of how this would be implemented.
Thanks for your time,
Christian
Playing off of what Morion said, take a look at these: Singletons
They are good for things like this. They will allow you to create a “global class” from which you can access variables like this:
[[MySingleton instance] myVariable];from anywhere in your game. The link will explain how to set one up.Singletons are probably a bit more organized and easy to use, but Morion’s way is most likely faster.