コード例 #1
0
ファイル: LoadingScreen.cs プロジェクト: GodLesZ/svn-dump
        /// <summary>
        /// Activates the loading screen.
        /// </summary>
        public static void Load(ScreenManager screenManager, bool loadingIsSlow, PlayerIndex? controllingPlayer,
                                params GameScreen[] screensToLoad)
        {
            // Tell all the current screens to transition off.
            foreach (GameScreen screen in screenManager.GetScreens())
            {
                screen.ExitScreen();
            }

            // Create and activate the loading screen.
            var loadingScreen = new LoadingScreen(loadingIsSlow, screensToLoad);

            screenManager.AddScreen(loadingScreen, controllingPlayer);
        }
コード例 #2
0
 /// <summary>
 /// Event handler for when the user selects ok on the "are you sure
 /// you want to quit" message box. This uses the loading screen to
 /// transition from the game back to the main menu screen.
 /// </summary>
 private void ConfirmQuitMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
 {
     LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen());
 }
コード例 #3
0
        private void entry_Selected(object sender, PlayerIndexEventArgs e)
        {
            string Level = ((MenuEntry)sender).Text;

            LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, new GamePlayScreen(Level, ScreenManager));
        }