예제 #1
0
        public static void Initialize(LauncherInformation launcherInformation)
        {
            // Player
            GameInformation.Instance.PlayerInformation = launcherInformation.Player;

            GameClientSettingsInformation = launcherInformation.GameClientSettingsInformation;

            launcherInformation.GameClientSettingsInformation.WindowedWidth = Math.Max(
                launcherInformation.GameClientSettingsInformation.WindowedWidth,
                launcherInformation.GameClientSettingsInformation.MenuSupportedResolutionWidth);

            launcherInformation.GameClientSettingsInformation.WindowedHeight = Math.Max(
                launcherInformation.GameClientSettingsInformation.WindowedHeight,
                launcherInformation.GameClientSettingsInformation.MenuSupportedResolutionHeight);

            // Screen Resoltuion
            ScreenResolution = new Vector2(
                launcherInformation.GameClientSettingsInformation.WindowedWidth,
                launcherInformation.GameClientSettingsInformation.WindowedHeight);

            ScreenCenter = ScreenResolution / 2;

            MenuSupportedResolution = new Vector2(
                launcherInformation.GameClientSettingsInformation.MenuSupportedResolutionWidth,
                launcherInformation.GameClientSettingsInformation.MenuSupportedResolutionHeight);

            InGameSupportedResolution = new Vector2(
                launcherInformation.GameClientSettingsInformation.InGameResolutionWidth,
                launcherInformation.GameClientSettingsInformation.InGameResolutionHeight);
        }
예제 #2
0
        static void Main()
        {
            GameLauncher gameLauncher = new GameLauncher();

#if !DEBUGSCENE
            LauncherInformation li = gameLauncher.OpenDialog();

            if (li.LauncherOperationStatus == LauncherOperationStatus.AuthConfirmed)
            {
                Parameter.Initialize(li);
            }
            else
            {
                return;
            }
#endif

#if DEBUGSCENE
            DebugScene.InitializeObjects();
#endif

            using (var game = new Game1())
            {
                game.Run();
            }

            ServerInformationBroker.Instance.StopServices();
        }
예제 #3
0
        static bool CreateLauncherScreen(string[] args)
        {
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (args.Length == 0)
            {
                args = new string[] { "" }
            }
            ;

            GameLauncher        gameLauncher = new GameLauncher(args);
            LauncherInformation li           = gameLauncher.OpenDialog();

            if (li.LauncherOperationStatus == LauncherOperationStatus.AuthConfirmed)
            {
                Parameter.Initialize(li);
                return(true);
            }

            return(false);
        }