public ITypeSafeList Preallocate(ref ITypeSafeList list, int size) { if (list == null) { list = new TypeSafeFasterListForECSForStructs <EntityViewType>(size); } else { list.ReserveCapacity(size); } return(list); }
public void BuildEntityViewAndAddToList(ref ITypeSafeList list, EGID entityID, out IEntityView entityView) { _initializer.ID = entityID; if (list == null) { list = new TypeSafeFasterListForECSForStructs <EntityViewType>(); } var castedList = list as TypeSafeFasterListForECSForStructs <EntityViewType>; castedList.Add(_initializer); entityView = null; }
public void BuildEntityViewAndAddToList(ref ITypeSafeList list, int entityID, out IEntityView entityView) { var structEntityView = default(EntityViewType); structEntityView.ID = entityID; if (list == null) { list = new TypeSafeFasterListForECSForStructs <EntityViewType>(); } var castedList = list as TypeSafeFasterListForECSForStructs <EntityViewType>; castedList.Add(structEntityView); entityView = null; }