Beispiel #1
0
 public static void RegisterAll(EntitySystem system)
 {
     system.Register((IRenderer) new FrameRateMonitoring());
     system.Register((ISystem) new FrameRateMonitoring());
     system.Register(new UpdateRateMonitoring());
     system.Register(new PressEscapeToQuit());
 }
Beispiel #2
0
 public static void RegisterAll(EntitySystem system)
 {
     system.Register(new ZGravitation());
     system.Register(new BoxCollision());
     system.Register(new MotionSystem());
     system.Register(new Travelling());
 }
Beispiel #3
0
 public static void RegisterAll(EntitySystem system)
 {
     system.Register(new ScreenBackgroundRenderer());
     system.Register(new TextureRenderer());
     system.Register(new SpriteRenderer());
     system.Register(new BorderRenderer());
     system.Register(new TextRenderer());
 }
 public static void RegisterAll(EntitySystem system)
 {
     system.Register(new MouseStateProcessing());
     system.Register(new MouseDragging());
     system.Register(new MouseDraggingAndDropping());
     system.Register(new MouseClicking());
     system.Register(new MouseWheelScaling());
 }
Beispiel #5
0
 public static void RegisterAll(EntitySystem system)
 {
     system.Register(new TopDownController());
     system.Register(new BufferedLogAdvancement());
     system.Register(new PercentBarUpdates());
     system.Register(new UpdateBattlePresenter());
     system.Register(new BattleAdvancement());
 }
Beispiel #6
0
 public static void RegisterAll(EntitySystem system)
 {
     // Drawn in Front-To-Back Order
     system.Register(new TextRenderer());
     system.Register(new BorderRenderer());
     system.Register(new TextureRenderer());
     system.Register(new HighlightRenderer());
     system.Register(new ScreenBackgroundRenderer());
 }
Beispiel #7
0
 protected override void Initialize()
 {
     IsMouseVisible = true;
     _sprites       = new SpriteBatch(GraphicsDevice);
     Resources.Init(this);
     Hack.TheGame = this;
     Input.SetController(_controller);
     _ecs.Register(new ControlHandler());
     _ecs.Register(new DirectionHandler());
     base.Initialize();
     _black = new RectangleTexture(new Rectangle(new Point(0, 0), new Point(1, 1)), Color.Black).Create();
     InitDisplayIfNeeded();
     World.Init(this, this, _sprites, _display);
     UI.Init(this, _sprites, _display);
     _display.Apply(_graphics);
     Window.Position = new Point(0, 0);
 }
Beispiel #8
0
 protected override void Initialize()
 {
     InitDisplayIfNeeded();
     // @todo #1 Bug: Update the GraphicsDeviceManager in the constructor, to avoid the window being mispositioned and visibly changing size
     _display.Apply(_graphics);
     Window.Position = new Point(0, 0); // Delete this once the above issue is fixed
     IsMouseVisible  = true;
     _sprites        = new SpriteBatch(GraphicsDevice);
     Resources.Init(this);
     Hack.TheGame = this;
     Input.SetController(_controller);
     _ecs.Register(new ControlHandler());
     _ecs.Register(new DirectionHandler());
     _black = new RectangleTexture(new Rectangle(new Point(0, 0), new Point(1, 1)), Color.Black).Create();
     World.Init(this, this, _sprites, _display);
     UI.Init(this, _sprites, _display);
     base.Initialize();
 }
Beispiel #9
0
 public static void RegisterAll(EntitySystem system)
 {
     system.Register(new ZGravitation());
     system.Register(new MotionBoxColliderStateSelector());
     system.Register(new ClearCollisions());
     system.Register(new BoxCollision());
     system.Register(new RigidBodyCollision());
     system.Register(new StepTriggerCollision());
     system.Register(new MotionSystem());
     system.Register(new Travelling());
 }
        protected override void Initialize()
        {
            InitDisplayIfNeeded();
            // @todo #1: Update the GraphicsDeviceManager in the constructor, to avoid the window being mispositioned and visibly changing size
            _display.Apply(_graphics);
            Window.Position = new Point(0, 0); // Delete this once the above issue is fixed
            IsMouseVisible  = true;
            _sprites        = new SpriteBatch(GraphicsDevice);
            GameInstance.Init(this);
            Input.SetController(_controller);
            _ecs.Register(new ControlHandler());
            _ecs.Register(new DirectionHandler());
            _black = new RectangleTexture(Color.Black).Create();
            Navigate.Init(_sceneFactory);
            DefaultFont.Load(Content);
#if DEBUG
            SceneNavigatorConsole.Enable();
            Metrics.Enable();
            EntityList.Enable(Keys.F12);
#endif
            base.Initialize();
        }
        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
        }
Beispiel #12
0
 public static void RegisterAll(EntitySystem system)
 {
     system.Register(new SoundsPlayer());
     system.Register(new MusicPlayer());
 }
Beispiel #13
0
 public static void RegisterAll(EntitySystem system)
 {
     system.Register(new MotionAnimationStateSelector());
     system.Register(new Animator());
 }
 public static void RegisterAll(EntitySystem system)
 {
     system.Register(new KeyboardInput());
     system.Register(new KeyboardCommandProcessing());
 }