review changes
This commit is contained in:
parent
e76f86b126
commit
b22e645163
@ -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")
|
||||
}
|
||||
}
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user