@@ -23,33 +23,14 @@ extension Entity {
2323 nexus. get ( safe: identifier)
2424 }
2525
26- /// Retrieves two components of the specified types assigned to this entity.
26+ /// Retrieves components of the specified types assigned to this entity.
2727 /// - Parameters:
28- /// - _: The first component type.
29- /// - _: The second component type.
30- /// - Returns: A tuple containing the component instances (or `nil` if not found).
28+ /// - components: The component types to retrieve.
29+ /// - Returns: A tuple containing the optional component instances.
3130 /// - Complexity: O(1)
3231 @inlinable
33- public func get< A, B> ( components _: A . Type , _: B . Type ) -> ( A ? , B ? ) where A: Component , B: Component {
34- let compA : A ? = get ( component: A . self)
35- let compB : B ? = get ( component: B . self)
36- return ( compA, compB)
37- }
38-
39- // swiftlint:disable large_tuple
40- /// Retrieves three components of the specified types assigned to this entity.
41- /// - Parameters:
42- /// - _: The first component type.
43- /// - _: The second component type.
44- /// - _: The third component type.
45- /// - Returns: A tuple containing the component instances (or `nil` if not found).
46- /// - Complexity: O(1)
47- @inlinable
48- public func get< A, B, C> ( components _: A . Type , _: B . Type , _: C . Type ) -> ( A ? , B ? , C ? ) where A: Component , B: Component , C: Component {
49- let compA : A ? = get ( component: A . self)
50- let compB : B ? = get ( component: B . self)
51- let compC : C ? = get ( component: C . self)
52- return ( compA, compB, compC)
32+ public func get< each C : Component > ( components: repeat ( each C ) . Type) -> ( repeat ( each C ) ? ) {
33+ ( repeat get( component: ( each C) . self) )
5334 }
5435
5536 /// Get or set component instance by type via subscript.
0 commit comments