Exemplo n.º 1
0
void Update()
{
  switch (state)
  {
    case MENU:
      game->Update();
      menuManager.Update();
      
      if (menuManager.StartGame()) 
      {
        state = GAME;
        game->SetDemoMode(false);
      }
      break;
    case GAME:
      game->Update();

      if (game->QuitGame())
      {
        state = MENU;
        game = new Game();
      }
      break;
  }

  Display();
}
void TitleScreen::Update(ALLEGRO_EVENT ev)
{
	menu.Update(ev, input);
}