예제 #1
0
            public void IsNotExecutedForUpdateSystemInDrawLoop()
            {
                var target = new FakeComponentDrawSystem();
                var world  = new EntityWorld();

                world.AddSystem(target);
                var    component = new FakeComponent1();
                Entity entity    = world.CreateEntity();

                entity.AddComponent(component);

                world.Update(TimeSpan.Zero);

                Assert.False(component.Processed);
            }
예제 #2
0
            public void IsExecutedForDrawGameLoopSystem()
            {
                var target = new FakeComponentDrawSystem();
                var world  = new EntityWorld();

                world.AddSystem(target);
                var    component = new FakeComponent1();
                Entity entity    = world.CreateEntity();

                entity.AddComponent(component);

                world.Draw();

                Assert.True(component.Processed);
            }
예제 #3
0
            public void IsExecutedForDrawGameLoopSystem()
            {
                var target = new FakeComponentDrawSystem();
                var world = new EntityWorld();
                world.AddSystem(target);
                var component = new FakeComponent1();
                Entity entity = world.CreateEntity();
                entity.AddComponent(component);

                world.Draw();

                Assert.True(component.Processed);
            }
예제 #4
0
            public void IsNotExecutedForUpdateSystemInDrawLoop()
            {
                var target = new FakeComponentDrawSystem();
                var world = new EntityWorld();
                world.AddSystem(target);
                var component = new FakeComponent1();
                Entity entity = world.CreateEntity();
                entity.AddComponent(component);

                world.Update(TimeSpan.Zero);

                Assert.False(component.Processed);
            }