autoupdate manifest
This commit is contained in:
parent
1c8c063e01
commit
39692bbfc2
|
|
@ -344,7 +344,7 @@ public class EntityStateMachine<StateName: Hashable> {
|
|||
|
||||
for (identifier, _) in currentState.providers {
|
||||
if let other = toAdd[identifier], let current = currentState.providers[identifier],
|
||||
current.identifier == other.identifier {
|
||||
current.identifier == other.identifier {
|
||||
toAdd[identifier] = nil
|
||||
} else {
|
||||
entity.remove(identifier)
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ class EntityStateMachineTests: XCTestCase {
|
|||
XCTAssertTrue(entity.get(component: MockComponent.self) === component1)
|
||||
XCTAssertTrue(entity.get(component: MockComponent2.self) === component2)
|
||||
}
|
||||
|
||||
|
||||
func testGetsDeinitedWhileBeingStronglyReferencedByComponentAssignedToEntity() {
|
||||
class Marker: Component {
|
||||
let fsm: EntityStateMachine<String>
|
||||
|
|
@ -421,7 +421,7 @@ class EntityStateMachineTests: XCTestCase {
|
|||
self.fsm = fsm
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let nexus = Nexus()
|
||||
var entity = nexus.createEntity()
|
||||
var markerComponent = Marker(fsm: EntityStateMachine<String>(entity: entity))
|
||||
|
|
|
|||
|
|
@ -103,7 +103,8 @@ extension EntityStateMachineTests {
|
|||
("testEnterSecondStateDoesNotRemoveOverlappingComponents", testEnterSecondStateDoesNotRemoveOverlappingComponents),
|
||||
("testEnterSecondStateRemovesDifferentComponentsOfSameType", testEnterSecondStateRemovesDifferentComponentsOfSameType),
|
||||
("testEnterSecondStateRemovesFirstStatesComponents", testEnterSecondStateRemovesFirstStatesComponents),
|
||||
("testEnterStateAddsStatesComponents", testEnterStateAddsStatesComponents)
|
||||
("testEnterStateAddsStatesComponents", testEnterStateAddsStatesComponents),
|
||||
("testGetsDeinitedWhileBeingStronglyReferencedByComponentAssignedToEntity", testGetsDeinitedWhileBeingStronglyReferencedByComponentAssignedToEntity)
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue