Пример #1
0
        /// Exit the game after finishing a level (after crossing the
        /// finish line)
        /// Takes a 'disconnected' boolean, which should be true if we
        /// came from the disconnection dialog after losing connection
        /// with another player.
        public static void ExitGameOnFinish(Recording recording = null, bool disconnected = false)
        {
            ExitType exit = disconnected ? ExitType.DISCONNECT : ExitType.FINISH;

            SceneManager.outs = new GameOuts(opts, exit, recording);
            Load(Magic.Scenes.POSTGAME);
        }
Пример #2
0
        /// Exit the game by quitting (e.g. pressing 'exit' in the pause
        /// menu or disconnect dialog)
        /// Takes a 'disconnected' boolean, which should be true if we
        /// came from the disconnection dialog after losing connection
        /// with another player.
        public static void ExitGameOnQuit(bool disconnected)
        {
            ExitType exit = disconnected ? ExitType.DISCONNECT : ExitType.QUIT;

            SceneManager.outs = new GameOuts(opts, exit);

            // if we're in a networked game, we should leave
            // the room
            MultiPlayerController.Instance.LeaveGame();

            Load(Magic.Scenes.MAIN_MENU);
        }