From b22e645163d49563f62124daa55b7a0de6199118 Mon Sep 17 00:00:00 2001 From: Niko Jochim <82joni1bif@hft-stuttgart.de> Date: Thu, 18 Jun 2020 19:30:27 +0200 Subject: [PATCH] review changes --- .../Components/DefaultWayComponent.swift | 29 ------------------- GoldWars/GoldWars/Scenes/GameScene.swift | 4 +-- 2 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 GoldWars/GoldWars/Components/DefaultWayComponent.swift diff --git a/GoldWars/GoldWars/Components/DefaultWayComponent.swift b/GoldWars/GoldWars/Components/DefaultWayComponent.swift deleted file mode 100644 index 118532d..0000000 --- a/GoldWars/GoldWars/Components/DefaultWayComponent.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// DefaultWayComponent.swift -// GoldWars -// -// Created by Jakob Haag on 18.05.20. -// Copyright © 2020 SP2. All rights reserved. -// - -import Foundation -import GameplayKit -import SpriteKit - -class DefaultWayComponent: GKComponent { - var shapeNode: SKShapeNode - - init(pathToDraw: CGMutablePath) { - self.shapeNode = SKShapeNode() - shapeNode.path = pathToDraw - shapeNode.strokeColor = UIColor(red: 0.852, green: 0.649, blue: 0.123, alpha: 1) - shapeNode.lineWidth = 10 - shapeNode.zPosition = 0 - shapeNode.name = "way" - super.init() - } - - required init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } -} diff --git a/GoldWars/GoldWars/Scenes/GameScene.swift b/GoldWars/GoldWars/Scenes/GameScene.swift index 9eaa362..de3f4b9 100644 --- a/GoldWars/GoldWars/Scenes/GameScene.swift +++ b/GoldWars/GoldWars/Scenes/GameScene.swift @@ -143,7 +143,7 @@ class GameScene: SKScene{ continue } if nodeChild.name != "clouds"{ - nodeChild.run(sequence,completion: { + nodeChild.run(sequence) { if !actionAdded { let explosion = self.getFinalExplosion() self.addChild(explosion) @@ -162,7 +162,7 @@ class GameScene: SKScene{ explosion.run(action) actionAdded = true } - }) + } } } }