enums - C# XNA - any way to "refresh" game states? -


After

then I'm using enum for game states. When I am in the game play position, I can stop and come back to the main menu . But if I'm playing the play game and click to move to the game again, everything is as I left it. I'm finding some way to "restart / refresh / flush" the way to playing playing state. So if I go back to it then I have to start.

Now you have some code (an estimate) that initiates your game statement , When the program starts. You need to take out that code (if necessary) so that it can be asked to start playing the game at any time. Like when you are starting a new game, like running your game state in "playing games".

In fact, most of the initialization code (i.e. everything except the baggage, which is not needed to restart a new game), you probably want to run only When you start the program and then it is redundant then it will be run and the boot bar will slow down.


Comments

Popular posts from this blog

c# - NewtonSoft JArray - how to select multiple elements with LINQ -

c# - Process.Kill() returns access denied -

c# - Using the generic type 'System.Collections.Generic.List<T>' requires 1 type arguments -