From 7b128a7ee8f49ef9334a5cd86174f04fb331fdfb Mon Sep 17 00:00:00 2001 From: 127-Z3R0 <81heti1bif@hft-stuttgart.de> Date: Tue, 21 Apr 2020 20:07:36 +0200 Subject: [PATCH] delete commented Code and prints --- GoldWars/GoldWars/Base/Base.swift | 1 - GoldWars/GoldWars/Game/GameScene.swift | 20 -------------------- 2 files changed, 21 deletions(-) diff --git a/GoldWars/GoldWars/Base/Base.swift b/GoldWars/GoldWars/Base/Base.swift index 595ba31..c5abd99 100644 --- a/GoldWars/GoldWars/Base/Base.swift +++ b/GoldWars/GoldWars/Base/Base.swift @@ -34,7 +34,6 @@ class Base : SKSpriteNode{ } override func touchesBegan(_ touches: Set, with event: UIEvent?) { - print("\(self.name!) was touched and is located at \(self.position)") self.run( SKAction.sequence( [ diff --git a/GoldWars/GoldWars/Game/GameScene.swift b/GoldWars/GoldWars/Game/GameScene.swift index 29f5012..30e1450 100644 --- a/GoldWars/GoldWars/Game/GameScene.swift +++ b/GoldWars/GoldWars/Game/GameScene.swift @@ -57,24 +57,6 @@ class GameScene: SKScene, SKPhysicsContactDelegate { bases[5].physicsBody?.collisionBitMask = physicsBodyNumber.emptyNumber bases[5].physicsBody?.contactTestBitMask = physicsBodyNumber.basePlayer2Number - // Spawn bases - /*for _ in 1...15 { - let color = PlayerColors.colors.randomElement() - let xRange = Int(frame.minX + frame.width * 0.07)...Int(frame.maxX - frame.width * 0.07) - let yRange = Int(frame.minY + frame.height * 0.07)...Int(frame.maxY - frame.width * 0.07) - let position = CGPoint( - x: Int.random(in: xRange), - y: Int.random(in: yRange) - ) - - print("Generating Base at \(position)") - - let base = Base(frame: frame, color: color!, position: position) - - addChild(base.spriteNode) - bases.append(base) - } - */ } func createVirginBases() { @@ -192,7 +174,6 @@ class GameScene: SKScene, SKPhysicsContactDelegate { override func touchesBegan(_ touches: Set, with event: UIEvent?) { for touch in touches { - print("hit") let locationUser = touch.location(in: self) if atPoint(locationUser) == menu { menu.removeFromParent() @@ -202,7 +183,6 @@ class GameScene: SKScene, SKPhysicsContactDelegate { override func touchesMoved(_ touches: Set, with event: UIEvent?) { for touch in touches { - print("hit") let locationUser = touch.location(in: self) if atPoint(locationUser) == player[1]{ player[1].position = locationUser