public bool TryGetComponents(TypeCache componentType, out ComponentArray comp) { for (int i = 0; i < componentCollections.Length; i++) { ComponentArray currCollection = componentCollections[i]; if (currCollection.TypeMatch(componentType)) { comp = currCollection; return(true); } } comp = null; return(false); }
public bool TryGetComponents <T0>(out ComponentArray comp) where T0 : IComponent { for (int i = 0; i < componentCollections.Length; i++) { ComponentArray currCollection = componentCollections[i]; if (currCollection.TypeMatch <T0>()) { comp = currCollection; return(true); } } comp = null; return(false); }