A followup to this post: Need advice on design/structure of a game
I have Game.cs
, which essentially holds my gamestate. All necessary variables will be included here when everything is said and done to make saving, loading, and starting a new game easier. My question is this: Should this class be static or dynamic? I tried dynamic, but I can't figure out where to instantiate it properly. At the moment, Game.cs
is instantiated when a button click event fires in a Windows Form, but afterward is treated as a local variable and it can't be accessed elsewhere. Is there a way to instantiate it globally? Or in this case is static
the way to go?