Example #1
0
 protected override void Initialize()
 {
     base.Initialize();
     MainCamera = new Camera(graphics.GraphicsDevice.Viewport);
     WindowController.SetContentManager(Content);
     GameManager.Initialize();
     WindowController.ChangeWindow(new MainWindow());
 }
Example #2
0
        protected override void Draw(GameTime gameTime)
        {
            spriteBatch.Begin(SpriteSortMode.Texture, transformMatrix: MainCamera.Transform);

            GraphicsDevice.Clear(Color.CornflowerBlue);
            base.Draw(gameTime);
            WindowController.Draw(gameTime, spriteBatch);

            spriteBatch.End();
        }
Example #3
0
        protected override void Update(GameTime gameTime)
        {
            if (IsExiting)
            {
                WindowController.UnloadContent();
                Exit();
                return;
            }

            base.Update(gameTime);
            input.Update(gameTime);
            MainCamera.UpdateCamera(graphics.GraphicsDevice.Viewport, input);
            WindowController.Update(gameTime, input);
        }