• Advertisement
Sign in to follow this  

C# XNA Game state options and oppions

This topic is 3297 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok so i recently ventured into the world of C# and XNA witch i must say i am fairly impressed with and enjoying however i have come up with this one question. In C++ makeing a game state engine is fairly easy but alas i am unsure of how to proceded with C# and XNA i know that XNA has a compent system witch has caught my attention and an interface system but the information i have been reading on it comes to differ and seem confusing at times. This is the basicas of what id like to beable to do with the state engine. Run Main Menu Change to the option selected Eg Options or new game or load game as the case my be I would like to keep these things seperate from each other in there own class and call on them only when needed. Basicaly i want to have one call from my main game code and that inturn iteself calls the correct function from the correct class. now in cpp i could do this simply by useing polymorphism and a pointer. Given that i am so new to C# sharps XNA it seems to me it is posible i am just uncertain of how to proceed. So if anyone knows a way to do this or has an oppion about this please feel free to share it. Fyi the reason for doing it this way is in part micro optimisation and it makes he main game class abit cleaner. ps sorry for the spellingmistakes i typed this in the dark. Regards Jouei

Share this post


Link to post
Share on other sites
Advertisement
Thanks for the reply iv taken a look at it, it seems to work rather nicly.
Although it will take me alittle while to figure out how it works it shouldnt be to hard :)

Thanks for the great tidbit and have a good day.

Regards Jouei

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement