public Engine(DrawingSurface drawingSurface) { RootControl = (Control)App.Current.RootVisual; Asserter.AssertIsNotNull(RootControl, "RootControl"); Asserter.AssertIsNotNull(drawingSurface, "drawingSurface"); _drawingSurface = drawingSurface; _content = new ContentManager(_gameServices); _content.RootDirectory = "Content"; _totalGameTime = TimeSpan.Zero; _accumulatedElapsedGameTime = TimeSpan.Zero; _lastFrameElapsedGameTime = TimeSpan.Zero; _targetElapsedTime = TimeSpan.FromTicks(166667L); _drawState = new DrawState(); _updateState = new UpdateState(); _gameServices = new GameServiceContainer(); }
public void RemoveService(Type type) { Asserter.AssertIsNotNull(type, "type"); _services.Remove(type); }