Simple state machine through different game classes?

Morning!

I was trying to implement a Simple State Machine in my project like was described in this link below :

And I achieved to make it work, but, I was thinking that in the long way, mantaining so much code in just one class would be too much of a hassle at the moment the game becames bigger.

There’s any workarround for using that same idea, but for different classes? I mean, instead of all on a game class, a Simple State Machine on “Game1” (for example) that manages the other game classes , like “TitleScreen.cs, MainGame.cs…”

Sorry for so many questions, and thanks for everything!

Like @Harag I would also recommend to take a look at the sample here:

http://xbox.create.msdn.com/en-US/education/catalog/sample/game_state_management

I’ve tried to open the project, but it won’t let me.

Should I take a look opening the classes individually?

I do it the way konju suggested myself. In addition i do some other stuff when i really need a lot of subclasses i wrap game then use that as the base of a new projects game1 i update static value references in the base to a Engine class or global use class if you like. For all the main variables like graphics.
It has the upside of letting you have total control you can have levels of sublevels all interacting seamlessly shared or separated data ect… there are no pain in the ass edge cases you can’t deal with directly.
The downside is, you need to be aware of what a device reset really means for your references values.

Link is broken, a Wayback Page is available though, Windows download link works
Xbox LIVE Indie Games
The project is not supported by VS 2019.