[4.0] change the screen

Started by
-1 comments, last by Pedro Henrique Franchi 9 years, 5 months ago

I have 3 class.

Like when he clicked on the menu, open another class with another screen .

string[] menuItems = { "Iniciar Jogo", "Pontuacao", "Como Jogar","Creditos", "Sair" };
spriteBatch = new SpriteBatch(GraphicsDevice);
menuComponent = new Menu(this,
spriteBatch,
Content.Load<SpriteFont>("menufont"),
menuItems);
Components.Add(menuComponent);

  if (CheckKey(Keys.Enter))
                 {
                    
                        switch (selectedIndex)
                        {
                            case 0:
                                {
                                
                               
 
                                break;
                                }
 
                            case 1:
                             
                                break;
 
                            case 2:
                               
                                break;
 
                            case 3:
                               
                                break;
 
                           
                                this.Game.Exit();
                                break;
                        }

This topic is closed to new replies.

Advertisement