delete commented Code and prints

This commit is contained in:
127-Z3R0 2020-04-21 20:07:36 +02:00
parent f3036a5b33
commit 7b128a7ee8
2 changed files with 0 additions and 21 deletions

View File

@ -34,7 +34,6 @@ class Base : SKSpriteNode{
}
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
print("\(self.name!) was touched and is located at \(self.position)")
self.run(
SKAction.sequence(
[

View File

@ -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<UITouch>, 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<UITouch>, with event: UIEvent?) {
for touch in touches {
print("hit")
let locationUser = touch.location(in: self)
if atPoint(locationUser) == player[1]{
player[1].position = locationUser