Skip to content

Commit 0876af9

Browse files
committed
Restore require API
1 parent 62a8046 commit 0876af9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/FirebladeECS/Single.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ extension Nexus {
6565
/// - Precondition: The count of entities with this component must be 0 or 1.
6666
/// - Complexity: O(M) where M is the number of families.
6767
public func single<S: SingleComponent>(_ component: S.Type) -> Single<S> {
68-
let family = family(requiresAll: S.self)
68+
let family = family(requires: S.self)
6969
precondition(family.count <= 1, "Singleton count of \(S.self) must be 0 or 1: \(family.count)")
7070
let entityId: EntityIdentifier = if family.isEmpty {
7171
createEntity(with: S()).identifier

Tests/FirebladeECSTests/SystemsTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import Testing
2222
}
2323

2424
private func batchDestroyEntities(in nexus: Nexus, count: Int) {
25-
let family = nexus.family(requiresAll: Position.self)
25+
let family = nexus.family(requires: Position.self)
2626

2727
family
2828
.entities

0 commit comments

Comments
 (0)