Beispiel #1
0
 private MainGame(string title, string startingViewName, SceneFactory sceneFactory, IController controller)
 {
     _graphics             = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     _startingViewName     = startingViewName;
     _sceneFactory         = sceneFactory;
     _controller           = controller;
     _metrics = new Metrics();
     _ecs     = Entity.System;
     Renderers.RegisterAll(_ecs);
     PhysicsSystems.RegisterAll(_ecs);
     Window.Title = title;
 }
        private NeedlesslyComplexMainGame(string title, string startingViewName, SceneFactory sceneFactory, IController controller)
        {
            _graphics = new GraphicsDeviceManager(this);
            _graphics.GraphicsProfile = GraphicsProfile.HiDef;
            Content.RootDirectory     = "Content";
            _startingViewName         = startingViewName;
            _sceneFactory             = sceneFactory;
            _controller = controller;
            MouseSnapshot.MousePositionProvider = new MouseViewport();
            _ecs = Entity.System;
            _ecs.Register(new MotionStateSelector());
            Renderers.RegisterAll(_ecs);
            PhysicsSystems.RegisterAll(_ecs);
            AnimationSystems.RegisterAll(_ecs);
            MouseSystems.RegisterAll(_ecs);
            KeyboardSystems.RegisterAll(_ecs);
            _ecs.Register(new CameraDirector());
            Window.Title = title;
#if DEBUG
            DevelopmentSystems.RegisterAll(_ecs);
#endif
        }