예제 #1
0
 private void SetResolution(int windowSizeX, int windowSizeY, bool isFullscreen)
 {
     GraphicsDM.PreferredBackBufferWidth  = windowSizeX;
     GraphicsDM.PreferredBackBufferHeight = windowSizeY;
     GraphicsDM.IsFullScreen = isFullscreen;
     GraphicsDM.ApplyChanges();
     ContentManager.Instance.Graphics = GraphicsDM.GraphicsDevice;
 }
예제 #2
0
        //-------------------------------------------------
        #region Odrinary Method's Region
        private void CheckRequests()
        {
            // chec if there is a request from the universe or not.
            if (this.Universe_Request)
            {
                switch (Request)
                {
                case RequestType.None:
                    break;

                case RequestType.Activate:
                {
                    try
                    {
                        this.Universe_Request = false;
                        this.Request          = RequestType.None;
                        // this.GameUniverse.WotoPlanet?.Show();
                        // this.GameUniverse.WotoPlanet?.BringToFront();
                        // this.GameUniverse.WotoPlanet?.Activate();
                        // this.GameUniverse.WotoPlanet?.Focus();
                        GraphicsDM.ToggleFullScreen();
                    }
                    catch
                    {
                        // the activating was not successful,
                        // so what should we do??
                        // here was the last step that we could avtive the
                        // holy planet of woto, but it failed,
                        // it means there is no further steps.
                        // so the story will end right here right now.
                    }
                    break;
                }

                default:
                    break;
                }
            }
        }