Exemplo n.º 1
0
 public void HasSingletonThrowsMultiple()
 {
     Assert.IsFalse(EmptySystem.HasSingleton <EcsTestData>());
     m_Manager.CreateEntity(typeof(EcsTestData));
     Assert.IsTrue(EmptySystem.HasSingleton <EcsTestData>());
     m_Manager.CreateEntity(typeof(EcsTestData));
     Assert.IsFalse(EmptySystem.HasSingleton <EcsTestData>());
 }
Exemplo n.º 2
0
        public void HasSingleton_ReturnsTrueWithEntityWithOnlyComponent()
        {
            Assert.IsFalse(EmptySystem.HasSingleton <EcsTestData>());

            m_Manager.CreateEntity(typeof(EcsTestData));
            Assert.IsTrue(EmptySystem.HasSingleton <EcsTestData>());

            m_Manager.CreateEntity(typeof(EcsTestData));
            Assert.IsFalse(EmptySystem.HasSingleton <EcsTestData>());
        }
Exemplo n.º 3
0
 public void HasSingletonWorks_ManagedComponents()
 {
     Assert.IsFalse(EmptySystem.HasSingleton <EcsTestManagedComponent>());
     m_Manager.CreateEntity(typeof(EcsTestManagedComponent));
     Assert.IsTrue(EmptySystem.HasSingleton <EcsTestManagedComponent>());
 }