From 40ba0f4468978a67c371cfdbf5d95076ebece993 Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Fri, 29 May 2020 16:14:07 +0200 Subject: [PATCH] Remove MapProtocol --- GoldWars/GoldWars/Map/MapFactory.swift | 8 -------- GoldWars/GoldWars/Map/TwoPlayerMapGenerator.swift | 8 +------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/GoldWars/GoldWars/Map/MapFactory.swift b/GoldWars/GoldWars/Map/MapFactory.swift index 3f28737..42d2aca 100644 --- a/GoldWars/GoldWars/Map/MapFactory.swift +++ b/GoldWars/GoldWars/Map/MapFactory.swift @@ -10,14 +10,6 @@ import Foundation import SpriteKit 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 { diff --git a/GoldWars/GoldWars/Map/TwoPlayerMapGenerator.swift b/GoldWars/GoldWars/Map/TwoPlayerMapGenerator.swift index 52e303d..07731cb 100644 --- a/GoldWars/GoldWars/Map/TwoPlayerMapGenerator.swift +++ b/GoldWars/GoldWars/Map/TwoPlayerMapGenerator.swift @@ -22,7 +22,7 @@ struct MapGenerationModel: Codable { } -class TwoPlayerMapGenerator: MapProtocol { +class TwoPlayerMapGenerator { let LOG = OSLog.init(subsystem: "MapGenerator", category: "TwoPlayerMapGenerator") @@ -264,10 +264,4 @@ class TwoPlayerMapGenerator: MapProtocol { ways.forEach({way in entityManager.add(way)}) } - - - func createPathFromBaseToBase(fromBase: Base, toBase: Base) { - let path = Way(fromBase: fromBase, toBase: toBase) - entityManager.add(path) - } }