private IEnumerator TeleportProcess() { if (loadScreen != null) { yield return(loadScreen.Show(timeIn)); teleportation.Raise(); yield return(new WaitForSeconds(loadScreenDuration)); yield return(loadScreen.Hide(timeOut)); } yield break; }
public void Start() { Hardware hardware = new Hardware(SCREEN_WIDTH, SCREEN_HEIGHT, 24, false); bool exit = false; WelcomeScreen welcome = new WelcomeScreen(hardware); welcome.Show(); MenuScreen menu = new MenuScreen(hardware); do { menu.Show(); switch (menu.ChosenOption) { case 1: GameScreen game = new GameScreen(hardware, 0); game.Show(); break; case 2: LoadScreen load = new LoadScreen(hardware); load.Show(); // To load the selected level GameScreen gameLoaded = new GameScreen(hardware, load.NumLevel); gameLoaded.Show(); break; case 3: ScoreBoard score = new ScoreBoard(hardware); score.Show(); break; case 4: CreditsScreen credits = new CreditsScreen(hardware); credits.Show(); break; default: exit = true; break; } } while (!exit); }