public void RemoveGroupAndEntities(ExclusiveGroup.ExclusiveGroupStruct groupID)
            {
                _enginesRoot.Target.RemoveGroupID(groupID);

                _enginesRoot.Target.QueueEntitySubmitOperation(
                    new EntitySubmitOperation(EntitySubmitOperationType.RemoveGroup, new EGID(0, groupID), new EGID()));
            }
Ejemplo n.º 2
0
 public EntityStructInitializer BuildEntity <T>(uint entityID,
                                                ExclusiveGroup.ExclusiveGroupStruct groupStructId, IEnumerable <object> implementors = null)
     where T : IEntityDescriptor, new()
 {
     return(_enginesRoot.Target.BuildEntity(new EGID(entityID, groupStructId),
                                            EntityDescriptorTemplate <T> .descriptor.entitiesToBuild, implementors));
 }
Ejemplo n.º 3
0
 public void RemoveEntities <T>(ExclusiveGroup.ExclusiveGroupStruct groupID)
     where T : IEntityDescriptor, new()
 {
     throw new NotImplementedException();
     //_weakReference.Target.QueueEntitySubmitOperation(
     //  new EntitySubmitOperation(EntitySubmitOperationType.RemoveGroup, -1, -1, groupID, -1, null, typeof(T)));
 }
Ejemplo n.º 4
0
 public EntityStructInitializer BuildEntity <T>(uint entityID,
                                                ExclusiveGroup.ExclusiveGroupStruct groupStructId, T descriptorEntity, IEnumerable <object> implementors)
     where T : IEntityDescriptor
 {
     return(_enginesRoot.Target.BuildEntity(new EGID(entityID, groupStructId),
                                            descriptorEntity.entitiesToBuild,
                                            implementors));
 }
        EntityStructInitializer BuildEntity <T>(ExclusiveGroup.ExclusiveGroupStruct groupID, object[] implementors) where T : IEntityDescriptor, new()
        {
            //temporary egid, will change during the real submission, needed for the initialization look up
            var egid = EGID.CREATE_WITHOUT_ID(groupID, _groupedEntityToAdd.entitiesBuiltThisSubmission++);

            var dic = EntityFactory.BuildGroupedEntities(egid, _groupedEntityToAdd.current,
                                                         EntityDescriptorTemplate <T> .descriptor.entitiesToBuild, implementors);

            return(new EntityStructInitializer(egid, dic.groups));
        }
Ejemplo n.º 6
0
            public void SwapEntityGroup <T>(EGID id, EGID toID
                                            , ExclusiveGroup.ExclusiveGroupStruct mustBeFromGroup) where T : IEntityDescriptor, new()
            {
                if (id.groupID != mustBeFromGroup)
                {
                    throw new ECSException("Entity is not coming from the expected group");
                }

                SwapEntityGroup <T>(id, toID);
            }
 public void RemoveGroupAndEntities(ExclusiveGroup.ExclusiveGroupStruct groupID)
 {
     RemoveGroupAndEntities((uint)groupID);
 }
 public void RemoveEntities <T>(ExclusiveGroup.ExclusiveGroupStruct groupID)
     where T : IEntityDescriptor, new()
 {
     throw new NotImplementedException();
 }
 public void RemoveEntity <T>(uint entityID, ExclusiveGroup.ExclusiveGroupStruct groupID) where T :
 IEntityDescriptor, new()
 {
     RemoveEntity <T>(new EGID(entityID, groupID));
 }
Ejemplo n.º 10
0
 public EGID(int entityID, ExclusiveGroup.ExclusiveGroupStruct groupID) : this()
 {
     _GID = MAKE_GLOBAL_ID(entityID, groupID);
 }
Ejemplo n.º 11
0
 void RemoveGroupID(ExclusiveGroup.ExclusiveGroupStruct groupID)
 {
     _idCheckers.Remove(groupID);
 }
Ejemplo n.º 12
0
 public void SwapEntityGroup <T>(EGID id, ExclusiveGroup.ExclusiveGroupStruct toGroupID)
     where T : IEntityDescriptor, new()
 {
     SwapEntityGroup <T>(id, new EGID(id.entityID, toGroupID));
 }
Ejemplo n.º 13
0
 public void PreallocateEntitySpace <T>(ExclusiveGroup.ExclusiveGroupStruct groupStructId, uint size)
     where T : IEntityDescriptor, new()
 {
     _enginesRoot.Target.Preallocate <T>(groupStructId, size);
 }
Ejemplo n.º 14
0
 void RemoveGroupID(ExclusiveGroup.ExclusiveGroupStruct groupID)
 {
 }
 public void SwapEntityGroup <T>(uint entityID, ExclusiveGroup.ExclusiveGroupStruct fromGroupID,
                                 ExclusiveGroup.ExclusiveGroupStruct toGroupID)
     where T : IEntityDescriptor, new()
 {
     SwapEntityGroup <T>(new EGID(entityID, fromGroupID), toGroupID);
 }
 public void SwapEntityGroup <T>(EGID fromID, ExclusiveGroup.ExclusiveGroupStruct toGroupID)
     where T : IEntityDescriptor, new()
 {
     SwapEntityGroup <T>(fromID, new EGID(fromID.entityID, (uint)toGroupID));
 }
 public void RemoveGroupAndEntities(ExclusiveGroup.ExclusiveGroupStruct groupID)
 {
     _weakReference.Target.QueueEntitySubmitOperation(
         new EntitySubmitOperation(EntitySubmitOperationType.RemoveGroup, new EGID(), new EGID(0, groupID)));
 }