Esempio n. 1
0
 public void OnStart()
 {
     _initSystem.Update(0);
     _world.Publish(new WorldInitializedMessage {
         World = _world
     });
 }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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();
        }
Esempio n. 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();
        }
Esempio n. 5
0
 public void Update(float delta)
 {
     _update.Update(delta);
 }
Esempio n. 6
0
 public void OnQuit()
 {
     _cleanupSystem.Update(0);
 }
Esempio n. 7
0
 public void OnTick(float dt)
 {
     _runtimeSystem.Update(dt);
 }