xna 4.0 - How to add a start (splash) screen in XNA 4.0? -



xna 4.0 - How to add a start (splash) screen in XNA 4.0? -

i want create simple splash screen containing next in menu;

" press "enter" start " // "instructions"

(obviously when you're in instructions page, there should "click here homecoming main menu option"

the game i'm creating 2d racing game (i haven't implemented timing in (dno how to))

i've tried implement in code; http://create.msdn.com/en-us/education/catalog/sample/game_state_management

but gave after half hours (too complicated)

any help welcome. give thanks you!!!

another course of study of action take using enum's store different game states.

//don't forget set above game1 class! public enum gamestate { menu, game, credits, etc }

initialize it:

gamestate gamestate = new gamestate(); gamestate = gamestate.menu;

then in you're draw method:

if(gamestate == gamestate.menu) { // draw menu, other stuff other gamestates. }

finally in update:

if(gamestate == gamestate.menu) { // check if keyboard pressed , go on if } else if(gamestate == gamestate.game) { // main game update logic }

hope helped!

xna-4.0

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -