コード例 #1
0
ファイル: Game1.cs プロジェクト: grzdrz/gms
        protected override void Initialize()
        {
            base.Initialize();

            GameLevel     simpleTest    = new GameLevel();
            GameLevel1    gameLevel1    = new GameLevel1();
            SimpleDemo1   simpleDemo1   = new SimpleDemo1();
            SimpleDemo2   simpleDemo2   = new SimpleDemo2();
            SimpleDemo3   simpleDemo3   = new SimpleDemo3();
            SimpleDemo4   simpleDemo4   = new SimpleDemo4();
            SimpleDemo5   simpleDemo5   = new SimpleDemo5();
            SimpleDemo6   simpleDemo6   = new SimpleDemo6();
            SimpleDemo7   simpleDemo7   = new SimpleDemo7();
            SimpleDemo8   simpleDemo8   = new SimpleDemo8();
            SimpleDemo9   simpleDemo9   = new SimpleDemo9();
            SimpleDemo10  simpleDemo10  = new SimpleDemo10();
            AdvancedDemo1 advancedDemo1 = new AdvancedDemo1();
            AdvancedDemo2 advancedDemo2 = new AdvancedDemo2();
            AdvancedDemo3 advancedDemo3 = new AdvancedDemo3();
            AdvancedDemo4 advancedDemo4 = new AdvancedDemo4();
            AdvancedDemo5 advancedDemo5 = new AdvancedDemo5();


            MenuScreen menuScreen = new MenuScreen("Samples");

            menuScreen.AddMenuItem(simpleTest.GetTitle(), EntryType.Screen, simpleTest, "1");
            menuScreen.AddMenuItem(gameLevel1.GetTitle(), EntryType.Screen, gameLevel1, "2");
            menuScreen.AddMenuItem(simpleDemo1.GetTitle(), EntryType.Screen, simpleDemo1, "3");
            menuScreen.AddMenuItem(simpleDemo2.GetTitle(), EntryType.Screen, simpleDemo2, "4");
            menuScreen.AddMenuItem(simpleDemo3.GetTitle(), EntryType.Screen, simpleDemo3, "5");
            menuScreen.AddMenuItem(simpleDemo4.GetTitle(), EntryType.Screen, simpleDemo4, "6");
            menuScreen.AddMenuItem(simpleDemo5.GetTitle(), EntryType.Screen, simpleDemo5, "7");
            menuScreen.AddMenuItem(simpleDemo6.GetTitle(), EntryType.Screen, simpleDemo6, "8");
            menuScreen.AddMenuItem(simpleDemo7.GetTitle(), EntryType.Screen, simpleDemo7, "9");
            menuScreen.AddMenuItem(simpleDemo8.GetTitle(), EntryType.Screen, simpleDemo8, "10");
            menuScreen.AddMenuItem(simpleDemo9.GetTitle(), EntryType.Screen, simpleDemo9, "11");
            menuScreen.AddMenuItem(simpleDemo10.GetTitle(), EntryType.Screen, simpleDemo10, "12");
            menuScreen.AddMenuItem(advancedDemo1.GetTitle(), EntryType.Screen, advancedDemo1, "13");
            menuScreen.AddMenuItem(advancedDemo2.GetTitle(), EntryType.Screen, advancedDemo2, "14");
            menuScreen.AddMenuItem(advancedDemo3.GetTitle(), EntryType.Screen, advancedDemo3, "15");
            menuScreen.AddMenuItem(advancedDemo4.GetTitle(), EntryType.Screen, advancedDemo4, "16");
            menuScreen.AddMenuItem(advancedDemo5.GetTitle(), EntryType.Screen, advancedDemo5, "17");


            menuScreen.AddMenuItem("", EntryType.Separator, null, "");
            menuScreen.AddMenuItem("Exit", EntryType.ExitItem, null, "");

            MainMenuScreen mainMenuScreen = new MainMenuScreen("MainMenu");

            mainMenuScreen.AddMenuItem(EntryType.Screen, menuScreen);
            mainMenuScreen.AddMenuItem(EntryType.ExitItem, null);

            ScreenManager.AddScreen(background = new BackgroundScreen());
            ScreenManager.AddScreen(mainMenuScreen);
            ScreenManager.AddScreen(new LogoScreen(TimeSpan.FromSeconds(3.0)));
        }