Exemplo n.º 1
0
        public void StartGame(S.StartGame p)
        {
            StartGameButton.Enabled = true;

            switch (p.Result)
            {
            case 0:
                MirMessageBox.Show("Starting the game is currently disabled.");
                break;

            case 1:
                MirMessageBox.Show("You are not logged in.");
                break;

            case 2:
                MirMessageBox.Show("Your character could not be found.");
                break;

            case 3:
                MirMessageBox.Show("No active map and/or start point found.");
                break;

            case 4:
                if (Settings.HighResolution)
                {
                    CMain.SetResolution(1024, 768);
                }
                ActiveScene = new GameScene();
                Dispose();
                break;
            }
        }
Exemplo n.º 2
0
        public void StartGame(S.StartGame p)
        {
            StartGameButton.Enabled = true;

            switch (p.Result)
            {
            case 0:
                MirMessageBox.Show("Starting the game is currently disabled.");
                break;

            case 1:
                MirMessageBox.Show("You are not logged in.");
                break;

            case 2:
                MirMessageBox.Show("Your character could not be found.");
                break;

            case 3:
                MirMessageBox.Show("No active map and/or start point found.");
                break;

            case 4:

                if (p.Resolution < Settings.Resolution || Settings.Resolution == 0)
                {
                    Settings.Resolution = p.Resolution;
                }

                switch (Settings.Resolution)
                {
                default:
                case 1024:
                    Settings.Resolution = 1024;
                    CMain.SetResolution(1024, 768);
                    break;

                case 1280:
                    CMain.SetResolution(1280, 800);
                    break;

                case 1366:
                    CMain.SetResolution(1366, 768);
                    break;

                case 1920:
                    CMain.SetResolution(1920, 1080);
                    break;
                }

                ActiveScene = new GameScene();
                DXManager.ResetDevice();
                Dispose();
                break;
            }
        }
Exemplo n.º 3
0
        public void StartGame(S.StartGame p)
        {
            StartGameButton.Enabled = true;

            switch (p.Result)
            {
            case 0:
                MirMessageBox.Show("启动游戏当前处于禁用状态.");
                break;

            case 1:
                MirMessageBox.Show("你没有登录.");
                break;

            case 2:
                MirMessageBox.Show("找不到你的角色.");
                break;

            case 3:
                MirMessageBox.Show("未找到可活动地图/或进入的起点.");
                break;

            case 4:

                if (p.Resolution < Settings.Resolution || Settings.Resolution == 0)
                {
                    Settings.Resolution = p.Resolution;
                }

                switch (Settings.Resolution)
                {
                default:
                case 1024:
                    Settings.Resolution = 1024;
                    CMain.SetResolution(1280, 768);          //默认 1024,768 进入画面大小
                    break;

                case 1280:
                    CMain.SetResolution(1280, 800);
                    break;

                case 1366:
                    CMain.SetResolution(1366, 768);
                    break;

                case 1920:
                    CMain.SetResolution(1920, 1080);
                    break;
                }

                ActiveScene = new GameScene();
                Dispose();
                break;
            }
        }
Exemplo n.º 4
0
        public void StartGame(S.StartGame p)
        {
            StartGameButton.Enabled = true;

            if (p.Resolution < Settings.Resolution || Settings.Resolution == 0)
            {
                Settings.Resolution = p.Resolution;
            }

            if (p.Resolution < 1024 || Settings.Resolution < 1024)
            {
                Settings.Resolution = 800;
            }
            else if (p.Resolution < 1366 || Settings.Resolution < 1366)
            {
                Settings.Resolution = 1024;
            }
            else if (p.Resolution >= 1366 && Settings.Resolution >= 1366)
            {
                Settings.Resolution = 1366;
            }

            switch (p.Result)
            {
            case 0:
                MirMessageBox.Show("Starting the game is currently disabled.");
                break;

            case 1:
                MirMessageBox.Show("You are not logged in.");
                break;

            case 2:
                MirMessageBox.Show("Your character could not be found.");
                break;

            case 3:
                MirMessageBox.Show("No active map and/or start point found.");
                break;

            case 4:
                if (Settings.Resolution == 1024)
                {
                    CMain.SetResolution(1024, 768);
                }
                else if (Settings.Resolution == 1366)
                {
                    CMain.SetResolution(1366, 768);
                }
                ActiveScene = new GameScene();
                Dispose();
                break;
            }
        }
Exemplo n.º 5
0
        public static void StartGame(S.StartGame p)
        {
            switch (p.Result)
            {
            case 0:
                CharSelManager.ShowMessageBox("Entering the game is disabled.");
                break;

            case 1:
                CharSelManager.ShowMessageBox("Account not found.");
                break;

            case 2:
                CharSelManager.ShowMessageBox("Character not found.");
                break;

            case 4:
                CharSelManager.StartGameSuccess(p.Resolution);
                break;

            default:
                break;
            }
        }
Exemplo n.º 6
0
        public void StartGame(S.StartGame p)
        {
            StartGameButton.Enabled = true;

            if (p.Resolution < Settings.Resolution || Settings.Resolution == 0)
            {
                Settings.Resolution = p.Resolution;
            }

            if (p.Resolution < 1024 || Settings.Resolution < 1024)
            {
                Settings.Resolution = 800;
            }
            else if (p.Resolution < 1366 || Settings.Resolution < 1280)
            {
                Settings.Resolution = 1024;
            }
            else if (p.Resolution < 1366 || Settings.Resolution < 1366)
            {
                Settings.Resolution = 1280;                                                        //not adding an extra setting for 1280 on server cause well it just depends on the aspect ratio of your screen
            }
            else if (p.Resolution >= 1366 && Settings.Resolution >= 1366)
            {
                Settings.Resolution = 1366;
            }

            switch (p.Result)
            {
            case 0:
                MirMessageBox.Show("Starting the game is currently disabled.");
                break;

            case 1:
                MirMessageBox.Show("You are not logged in.");
                break;

            case 2:
                MirMessageBox.Show("Your character could not be found.");
                break;

            case 3:
                MirMessageBox.Show("No active map and/or start point found.");
                break;

            case 4:
                if (Settings.Resolution == 1024)
                {
                    CMain.SetResolution(1024, 768);
                }
                else if (Settings.Resolution == 1280)
                {
                    CMain.SetResolution(1280, 800);
                }
                else if (Settings.Resolution == 1366)
                {
                    CMain.SetResolution(1366, 768);
                }
                ActiveScene = new GameScene();
                Dispose();
                break;
            }
        }
Exemplo n.º 7
0
        public void StartGame(S.StartGame p)
        {
            StartGameButton.Enabled = true;

            if (p.Resolution < Settings.Resolution || Settings.Resolution == 0)
            {
                Settings.Resolution = p.Resolution;
            }

            if (p.Resolution < 1024 || Settings.Resolution < 1024)
            {
                Settings.Resolution = 800;
            }
            else if (p.Resolution < 1366 || Settings.Resolution < 1280)
            {
                Settings.Resolution = 1024;
            }
            else if (p.Resolution < 1366 || Settings.Resolution < 1366)
            {
                Settings.Resolution = 1280;                                                        //not adding an extra setting for 1280 on server cause well it just depends on the aspect ratio of your screen
            }
            else if (p.Resolution >= 1366 && Settings.Resolution >= 1366)
            {
                Settings.Resolution = 1366;
            }

            switch (p.Result)
            {
            case 0:
                MirMessageBox.Show("服务器暂时不允许进入游戏。");
                break;

            case 1:
                MirMessageBox.Show("你没有登录。");
                break;

            case 2:
                MirMessageBox.Show("你的角色无法找到。");
                break;

            case 3:
                MirMessageBox.Show("找不到有效的地图/游戏起始点。");
                break;

            case 4:
                if (Settings.Resolution == 1024)
                {
                    CMain.SetResolution(1024, 768);
                }
                else if (Settings.Resolution == 1280)
                {
                    CMain.SetResolution(1280, 800);
                }
                else if (Settings.Resolution == 1366)
                {
                    CMain.SetResolution(1366, 768);
                }
                ActiveScene = new GameScene();
                Dispose();
                break;
            }
        }