Lint
This commit is contained in:
parent
dc1d2f67b4
commit
2e6ecdf104
|
|
@ -35,10 +35,11 @@ extension Nexus {
|
|||
convenience init(from sNexus: SNexus) throws {
|
||||
let entityIds = sNexus.entities.map { $0.key }.reversed()
|
||||
|
||||
// FIXME: this does not respect the generator of the target nexus!
|
||||
self.init(entityStorage: UnorderedSparseSet(),
|
||||
componentsByType: [:],
|
||||
componentsByEntity: [:],
|
||||
entityIdGenerator: DefaultEntityIdGenerator(startProviding: entityIds), // FIXME: this does not respect the generator of the target nexus!
|
||||
entityIdGenerator: DefaultEntityIdGenerator(startProviding: entityIds),
|
||||
familyMembersByTraits: [:],
|
||||
codingStrategy: DefaultCodingStrategy())
|
||||
|
||||
|
|
|
|||
|
|
@ -17,12 +17,11 @@ public final class SerializationTests: XCTestCase {
|
|||
let e3 = nexus.createEntity()
|
||||
nexus.createEntity(with: Position(x: 5, y: 18), Name(name: "yourName"))
|
||||
|
||||
|
||||
// Fragment entities
|
||||
nexus.destroy(entity: e2)
|
||||
nexus.destroy(entity: e3)
|
||||
nexus.destroy(entity: e1)
|
||||
|
||||
|
||||
let encoder = JSONEncoder()
|
||||
let data = try encoder.encode(nexus)
|
||||
|
||||
|
|
@ -43,7 +42,7 @@ public final class SerializationTests: XCTestCase {
|
|||
let firstEntity = nexus.createEntity(with: Name(name: "myName"), Position(x: 1, y: 2))
|
||||
let e3 = nexus.createEntity()
|
||||
let secondEntity = nexus.createEntity(with: Velocity(a: 3.14), Party(partying: true))
|
||||
|
||||
|
||||
// Fragment entities
|
||||
nexus.destroy(entity: e2)
|
||||
nexus.destroy(entity: e3)
|
||||
|
|
|
|||
Loading…
Reference in New Issue