@GaijinFox wrote:
I am reading the source code to learn how MonoGame works internally, and in the
Run(GameRunBehavior)
method of theGame
class I noticed the following:case GameRunBehavior.Synchronous: // XNA runs one Update even before showing the window DoUpdate( new GameTime() ); Platform.RunLoop(); EndRun(); DoExiting(); break;
There's
DoUpdate()
Later on, inside the
Platform.RunLoop()
it callsGame.Tick()
, which then calls internallyDoUpdate()
againFrom what I understand, it gets on an endless game loop on
Platform.RunLoop()
until the user quits the game.But why is it required to run that isolated
DoUpdate()
before it gets on the loop?
Posts: 3
Participants: 3