review changes

This commit is contained in:
Niko Jochim 2020-06-18 19:30:27 +02:00
parent e76f86b126
commit b22e645163
2 changed files with 2 additions and 31 deletions

View File

@ -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")
}
}

View File

@ -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
}
})
}
}
}
}