/// <summary> /// Gets an array of all elements of a specific type inside the collision shape /// </summary> public T[] GetElementsWithin <T>() where T : PhysicalElement { MtaElement[] array = MtaShared.GetArrayFromTable(MtaShared.GetElementsWithinColShape(element, ElementManager.Instance.GetTypeName(typeof(T))), "MTAElement"); return(ElementManager.Instance.CastArray <T>(array)); }
/// <summary> /// Gets an array of all elements of a specific type inside the collision shape /// </summary> public PhysicalElement[] GetElementsWithinOfType(Type type) { MtaElement[] array = MtaShared.GetArrayFromTable(MtaShared.GetElementsWithinColShape(element, ElementManager.Instance.GetTypeName(type)), "MTAElement"); return(ElementManager.Instance.CastArray <PhysicalElement>(array)); }