diff --git a/GoldWars/GoldWars/Game/GameScene.swift b/GoldWars/GoldWars/Game/GameScene.swift index 30e1450..c6f9651 100644 --- a/GoldWars/GoldWars/Game/GameScene.swift +++ b/GoldWars/GoldWars/Game/GameScene.swift @@ -51,12 +51,25 @@ class GameScene: SKScene, SKPhysicsContactDelegate { player.append(basePlayer2) createVirginBases() connectBases() - - bases[5].physicsBody = SKPhysicsBody(circleOfRadius: 50) + addPhysicsBodyToBase() + + } + + func addPhysicsBodyToBase() { + bases[5].physicsBody = SKPhysicsBody(circleOfRadius: 20) bases[5].physicsBody?.categoryBitMask = physicsBodyNumber.base5Number bases[5].physicsBody?.collisionBitMask = physicsBodyNumber.emptyNumber bases[5].physicsBody?.contactTestBitMask = physicsBodyNumber.basePlayer2Number - + + bases[6].physicsBody = SKPhysicsBody(circleOfRadius: 20) + bases[6].physicsBody?.categoryBitMask = physicsBodyNumber.base6Number + bases[6].physicsBody?.collisionBitMask = physicsBodyNumber.emptyNumber + bases[6].physicsBody?.contactTestBitMask = physicsBodyNumber.basePlayer2Number + + bases[7].physicsBody = SKPhysicsBody(circleOfRadius: 20) + bases[7].physicsBody?.categoryBitMask = physicsBodyNumber.base7Number + bases[7].physicsBody?.collisionBitMask = physicsBodyNumber.emptyNumber + bases[7].physicsBody?.contactTestBitMask = physicsBodyNumber.basePlayer2Number } func createVirginBases() {