public BaseEntity CreateEntity(ECSDefine.EntityType entityType, int entityId) { OperationObject operationObject = entityOperation.CreateOperationObject((int)entityType, entityId); if (operationObject == null) { Debug.LogError($"[ECSModule] CreateEntity Fail. componentType:{Enum.GetName(typeof(ECSDefine.EntityType), entityType)}"); return(null); } BaseEntity entity = operationObject as BaseEntity; entity.SetGlobalUnionId(GlobalUnionId); entity.SetEntityId(entityId); entity.SetEntityType(entityType); return(entity); }
public void SetEntityType(ECSDefine.EntityType entityType) { this.entityType = entityType; }
public void DeleteEntity(BaseEntity entity) { ECSDefine.EntityType entityType = entity.GetEntityType(); entityOperation.DeleteOperationObject((int)entityType, entity); }