c# - Static or dynamic class? -


a followup post: need advice on design/structure of game

i have game.cs, holds gamestate. necessary variables included here when said , done make saving, loading, , starting new game easier. question this: should class static or dynamic? tried dynamic, can't figure out instantiate properly. @ moment, game.cs instantiated when button click event fires in windows form, afterward treated local variable , can't accessed elsewhere. there way instantiate globally? or in case static way go?

have game class instance class: should instance fields/properties/methods, not static.

within game, should have 1 instance of game class. pass around of other classes, or make global, making public static public field on class.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

How can I fetch data from a web server in an android application? -

jquery - How can I dynamically add a browser tab? -