예제 #1
0
파일: Game.cs 프로젝트: neronmoon/GGJ2020
 public void OnStart()
 {
     _initSystem.Update(0);
     _world.Publish(new WorldInitializedMessage {
         World = _world
     });
 }
예제 #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();
        }
예제 #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();
        }
예제 #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();
        }
예제 #5
0
 public void Update(float delta)
 {
     _update.Update(delta);
 }
예제 #6
0
파일: Game.cs 프로젝트: neronmoon/GGJ2020
 public void OnQuit()
 {
     _cleanupSystem.Update(0);
 }
예제 #7
0
파일: Game.cs 프로젝트: neronmoon/GGJ2020
 public void OnTick(float dt)
 {
     _runtimeSystem.Update(dt);
 }