Remove MapProtocol
This commit is contained in:
parent
b210e04d38
commit
40ba0f4468
@ -10,14 +10,6 @@ import Foundation
|
|||||||
import SpriteKit
|
import SpriteKit
|
||||||
import os
|
import os
|
||||||
|
|
||||||
protocol MapProtocol {
|
|
||||||
var size: CGSize! {get set}
|
|
||||||
var entityManager: EntityManager! {get set}
|
|
||||||
|
|
||||||
init(scene: SKScene, entityManager: EntityManager)
|
|
||||||
|
|
||||||
func load(withModel mapModel: MapGenerationModel)
|
|
||||||
}
|
|
||||||
|
|
||||||
protocol CenterElementProtocol {
|
protocol CenterElementProtocol {
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ struct MapGenerationModel: Codable {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class TwoPlayerMapGenerator: MapProtocol {
|
class TwoPlayerMapGenerator {
|
||||||
|
|
||||||
let LOG = OSLog.init(subsystem: "MapGenerator", category: "TwoPlayerMapGenerator")
|
let LOG = OSLog.init(subsystem: "MapGenerator", category: "TwoPlayerMapGenerator")
|
||||||
|
|
||||||
@ -264,10 +264,4 @@ class TwoPlayerMapGenerator: MapProtocol {
|
|||||||
|
|
||||||
ways.forEach({way in entityManager.add(way)})
|
ways.forEach({way in entityManager.add(way)})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func createPathFromBaseToBase(fromBase: Base, toBase: Base) {
|
|
||||||
let path = Way(fromBase: fromBase, toBase: toBase)
|
|
||||||
entityManager.add(path)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user