Example #1
0
 public void OnStart()
 {
     _initSystem.Update(0);
     _world.Publish(new WorldInitializedMessage {
         World = _world
     });
 }
        public void Update_Should_call_update_on_all_systems()
        {
            bool done1 = false;
            bool done2 = false;

            using (ISystem <int> system = new SequentialSystem <int>(
                       new ActionSystem <int>(_ => done1 = true),
                       new ActionSystem <int>(_ => done2 = true)))
            {
                system.Update(0);
            }

            Check.That(done1).IsTrue();
            Check.That(done2).IsTrue();
        }
        public void Update_Should_not_call_update_on_any_systems_When_disabled()
        {
            bool done1 = false;
            bool done2 = false;

            using (ISystem <int> system = new SequentialSystem <int>(
                       new ActionSystem <int>(_ => done1 = true),
                       new ActionSystem <int>(_ => done2 = true)))
            {
                system.IsEnabled = false;
                system.Update(0);
            }

            Check.That(done1).IsFalse();
            Check.That(done2).IsFalse();
        }
Example #4
0
        public void Draw(SpriteBatchState state)
        {
            state.TransformMatrix = Camera.GetViewMatrix();

            state.Begin();

            _draw.Update(state);

            state.End();

            state.TransformMatrix = SceneManager.ViewportAdapter.GetScaleMatrix();

            state.Begin();

            _gui.Update(state);

            state.End();
        }
Example #5
0
 public void Update(float delta)
 {
     _update.Update(delta);
 }
Example #6
0
 public void OnQuit()
 {
     _cleanupSystem.Update(0);
 }
Example #7
0
 public void OnTick(float dt)
 {
     _runtimeSystem.Update(dt);
 }