Ejemplo n.º 1
0
        public void Update(GameTime gameTime)
        {
            ScaledResolution.Update();

            var screens = Screens.ToArray();

            if (_doInit)
            {
                _doInit = false;

                foreach (var screen in screens)
                {
                    screen.Init(GuiRenderer, true);
                }
            }

            FocusManager.Update(gameTime);

            foreach (var screen in screens)
            {
                if (!(screen is IGameState) && screen != null)
                {
                    screen.Update(gameTime);
                }
            }

            // DebugHelper.Update(gameTime);
        }
Ejemplo n.º 2
0
 private static void WindowOnResize(object sender, EventArgs eventArgs)
 {
     _projection = Matrix4.CreatePerspectiveFieldOfView(MathHelper.DegreesToRadians(60), (float)Window.Width / Window.Height, 0.01f, 512);
     GL.Viewport(Window.ClientSize);
     ScaledResolution.Update();
 }