Beispiel #1
0
 /// <summary>
 /// An overrideable method called whenever the menuCancel action is triggered
 /// </summary>
 void OnCancel()
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new PhoneMainMenuScreen());
 }
Beispiel #2
0
 void highscoreButton_Tapped(object sender, EventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, null, new BackgroundScreen(), new HighscoreScreen());
 }
Beispiel #3
0
 void playButton_Tapped(object sender, EventArgs e)
 {
     // When the "Play" button is tapped, we load the GameplayScreen
     LoadingScreen.Load(ScreenManager, true, PlayerIndex.One, new level1());
 }
Beispiel #4
0
 void creditButton_Tapped(object sender, EventArgs e)
 {
     LoadingScreen.Load(ScreenManager, true, null, new BackgroundScreen(), new CreditsScreen());
 }
Beispiel #5
0
        /// <summary>
        /// The Method which is call if the user hits the next button
        /// </summary>
        public void OnCancel()
        {
            // Switch through the levels

            switch (levelID)
            {
            case 1:
                LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level2());
                break;

            case 2:
                LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level3());
                break;

            case 3:
                LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level4());
                break;

            case 4:
                LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level5());
                break;

            case 5:
                LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level6());
                break;

            case 6:
                LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level7());
                break;

            case 7:
                LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level8());
                break;

            case 8:
                LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level9());
                break;

            case 9:
                LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level10());
                break;

            case 10:
                LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level11());
                break;

            //case 11:
            //    LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level12());
            //    break;
            case 11:
                LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new lastLevel());
                break;

            default:
                Highscore = new highscore();
                if (Highscore.isInHighscore(SaveGame.ts, SaveGame.LevelID))
                {
                    Highscore.addHighscoreEntry(SaveGame.LevelID, SaveGame.ts);
                }

                SaveGame.ResetGameState();

                LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new PhoneMainMenuScreen());
                break;
            }
        }
Beispiel #6
0
 /// <summary>
 /// The "Lost Life" button handler just calls the OnCancel method so that
 /// pressing the "Lost Life" button is the same as pressing the hardware back button.
 /// </summary>
 void tryagainButton_Tapped(object sender, EventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level1());
 }
Beispiel #7
0
 void highscoreButton_Tapped(object sender, EventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new HighscoreScreen());
 }
Beispiel #8
0
 protected override void OnCancel()
 {
     LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level1());
     base.OnCancel();
 }