Fix player2 collision detection

This commit is contained in:
CypherPoet 2019-02-17 00:22:10 -05:00
parent ef24389b6b
commit 548349ccf5
1 changed files with 1 additions and 1 deletions

View File

@ -290,7 +290,7 @@ extension GameScene: SKPhysicsContactDelegate {
if otherNode.name == NodeNames.player1.rawValue {
destroy(player: player1)
} else if nodeB.name == NodeNames.player2.rawValue {
} else if otherNode.name == NodeNames.player2.rawValue {
destroy(player: player2)
} else if otherNode.name == NodeNames.building.rawValue {
bananaHit(building: otherNode as! BuildingNode)