An alternative to static classes
So I'm currently using a static class called GameFile and it holds the
game instance, the current map, the player posiition, the player name,
player money, etc. Basically all the global info. I was wondering if there
is an alternative to this?
This is how I currently set in the static class the game instance (as an
example):
GameFile.gameInstance = new ChromeGame();
and then when I need to use the information I call
GameFile.gameInstance.addScreen(SplashScreen).
No comments:
Post a Comment