diff --git a/GoldWars/GoldWars/Game/GameScene.swift b/GoldWars/GoldWars/Game/GameScene.swift index 00b152a..8dcdebf 100644 --- a/GoldWars/GoldWars/Game/GameScene.swift +++ b/GoldWars/GoldWars/Game/GameScene.swift @@ -34,8 +34,8 @@ class GameScene: SKScene, SKPhysicsContactDelegate { let maxX = self.size.width let midY = self.size.height / 2 - let basePlayer1 = Base(color: SKColor.red, position: CGPoint(x: maxX * 0.1, y: midY), name: "Player1" ) - let basePlayer2 = Base(color: SKColor.blue, position: CGPoint(x: maxX * 0.9, y: midY), name: "Player2" ) + let basePlayer1 = Base(color: SKColor.red, position: CGPoint(x: maxX * 0.1, y: midY), name: "Player1", unitCount: 100, unitType: Unit.General) + let basePlayer2 = Base(color: SKColor.blue, position: CGPoint(x: maxX * 0.9, y: midY), name: "Player2", unitCount: 100, unitType: Unit.General) basePlayer2.physicsBody = SKPhysicsBody(circleOfRadius: 50) basePlayer2.physicsBody?.categoryBitMask = physicsBodyNumber.basePlayer2Number basePlayer2.physicsBody?.collisionBitMask = physicsBodyNumber.emptyNumber