Пример #1
0
 public MainGame(string startingViewName, ScreenSettings screenSettings, SceneFactory sceneFactory, IController controller)
 {
     screenSettings.Apply(new GraphicsDeviceManager(this));
     Content.RootDirectory = "Content";
     _startingViewName     = startingViewName;
     _sceneFactory         = sceneFactory;
     _controller           = controller;
 }
Пример #2
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
        }
Пример #4
0
 public NeedlesslyComplexMainGame(string title, string startingViewName, Display screenSettings, SceneFactory sceneFactory, IController controller)
     : this(title, startingViewName, sceneFactory, controller)
 {
     _areScreenSettingsPreCalculated = true;
     _display = screenSettings;
 }
Пример #5
0
 // @todo #1 fix this so we config everything before the game
 public NeedlesslyComplexMainGame(string title, string startingViewName, Size2 defaultGameSize, SceneFactory sceneFactory, IController controller)
     : this(title, startingViewName, sceneFactory, controller)
 {
     _areScreenSettingsPreCalculated = false;
     _defaultScreenSize = defaultGameSize;
 }