Example #1
0
 static void Main()
 {
     MouseSystems.RegisterAll(Entity.System);
     SoundSystems.RegisterAll(Entity.System);
     using (var game = new NeedlesslyComplexMainGame("MonoGame.Cards", "Table", new Display(1600, 900, false, 1), CreateSceneFactory(), CreateController()))
         game.Run();
 }
Example #2
0
 static void Main()
 {
     using (var game = new NeedlesslyComplexMainGame("Golden Arrow", "Setup", new Display(1600, 900, false, 1), CreateSceneFactory(), CreateController()))
     {
         MouseSystems.RegisterAll(Entity.System);
         SoundSystems.RegisterAll(Entity.System);
         Entity.Register(new KeyboardInput());
         Entity.Register(new HandDisplaying());
         game.Run();
     }
 }
        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
        }