protected override void BeginRun() { DIContainer.Clear(); DIContainer.Add <AssetLoader>("AssetLoader", loader); if (doReplay == false) { startNewGame(); } else { this.IsFixedTimeStep = true; //this.graphics.SynchronizeWithVerticalRetrace = false; //this.graphics.ApplyChanges(); this.TargetElapsedTime = TimeSpan.FromMilliseconds(8.333333); replayEvents = Replay.Load(replayFilePath); currentStage = new Level("Level"); currentStage.End += (o, e) => Exit(); currentStage.BeforeStart(); currentStage.Start(); } base.BeginRun(); }