public void MultipleComponents_DifferentTypes() { TestSetUp(); EntityFramework.ComponentInterfaces.ITagSystem tagSys = new EntityFramework.Components.TagSystem(); tagSys.Init(typeof(EntityFramework.Components.Tag)); EntityFramework.ComponentInterfaces.IChildrenSystem childSys = new EntityFramework.Components.ChildrenSystem(); childSys.Init(typeof(EntityFramework.Components.Children)); _system.AddComponentSystem <EntityFramework.ComponentInterfaces.ITagSystem> (tagSys); _system.AddComponentSystem <EntityFramework.ComponentInterfaces.IChildrenSystem> (childSys); Guid id = Guid.NewGuid(); _system.AddNewEntity(id); _system.AddComponentToEntity <EntityFramework.ComponentInterfaces.ITagSystem>(id); _system.AddComponentToEntity <EntityFramework.ComponentInterfaces.IChildrenSystem>(id); _system.RemoveComponentFromEntity <EntityFramework.ComponentInterfaces.ITagSystem>(id); _system.RemoveComponentFromEntity <EntityFramework.ComponentInterfaces.IChildrenSystem>(id); _system.RemoveComponentSystem <EntityFramework.ComponentInterfaces.ITagSystem>(); _system.RemoveComponentSystem <EntityFramework.ComponentInterfaces.IChildrenSystem>(); _system.RemoveEntity(id); TestTearDown(); }
public void MultipleComponents_DifferentTypes() { TestSetUp(); EntityFramework.ComponentInterfaces.ITagSystem tagSys = new EntityFramework.Components.TagSystem(); tagSys.Init(typeof(EntityFramework.Components.Tag)); EntityFramework.ComponentInterfaces.IChildrenSystem childSys = new EntityFramework.Components.ChildrenSystem(); childSys.Init(typeof(EntityFramework.Components.Children)); _system.AddComponentSystem<EntityFramework.ComponentInterfaces.ITagSystem> (tagSys); _system.AddComponentSystem<EntityFramework.ComponentInterfaces.IChildrenSystem> (childSys); Guid id = Guid.NewGuid(); _system.AddNewEntity(id); _system.AddComponentToEntity <EntityFramework.ComponentInterfaces.ITagSystem>(id); _system.AddComponentToEntity <EntityFramework.ComponentInterfaces.IChildrenSystem>(id); _system.RemoveComponentFromEntity <EntityFramework.ComponentInterfaces.ITagSystem>(id); _system.RemoveComponentFromEntity <EntityFramework.ComponentInterfaces.IChildrenSystem>(id); _system.RemoveComponentSystem <EntityFramework.ComponentInterfaces.ITagSystem>(); _system.RemoveComponentSystem <EntityFramework.ComponentInterfaces.IChildrenSystem>(); _system.RemoveEntity(id); TestTearDown(); }