Ejemplo n.º 1
0
        protected override void Update(GameTime gameTime)
        {
            if (_pendingCoreGame != null && _coreGame == null)
            {
                _coreGame = _pendingCoreGame;
                _coreGame.AssignHost(this);

                if (_shouldLoadContentOnDelayedGame)
                {
                    _coreGame.LoadContent();
                }
            }

            if (_coreGame != null)
            {
#if PLATFORM_WINDOWS
                if (Window != null)
                {
                    if (_windowWidth != Window.ClientBounds.Width ||
                        _windowHeight != Window.ClientBounds.Height)
                    {
                        OnClientSizeChanged(this, EventArgs.Empty);
                    }
                }
#endif

                _coreGame.Update(gameTime);
                return;
            }
        }
Ejemplo n.º 2
0
        public void Update(TimeSpan totalTimeSpan, TimeSpan elapsedTimeSpan)
        {
            if (!_hasLoadedContent)
            {
                _coreGame.AssignHost(this);
                _coreGame.LoadContent();
                _hasLoadedContent = true;
            }

            _coreGame.Update(new GameTime(totalTimeSpan, elapsedTimeSpan));
        }