Пример #1
0
#pragma warning restore CS8618

        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            _gameWorld = new GameWorld();
            _player    = _gameWorld.CreateEntity();
            _object    = _gameWorld.CreateEntity();

            _physicalWorld         = new PhysicalWorld();
            _physicalWorld.Gravity = Vector2.Zero;

            _resolutionIndependence = new ResolutionIndependentRenderer(this);
            _camera = new Camera2D(_resolutionIndependence);
            InitializeResolutionIndependence(_graphics.GraphicsDevice.Viewport.Width, _graphics.GraphicsDevice.Viewport.Height);

            base.Initialize();
        }