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

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

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -