change method getBaseByTeam to getBaseByPlayer

This commit is contained in:
Jakob Haag 2020-05-11 18:06:35 +02:00
parent 0c9abe0d08
commit 282a729250

View File

@ -8,6 +8,7 @@
import SpriteKit import SpriteKit
import GameplayKit import GameplayKit
import GameKit
class GameScene: SKScene{ class GameScene: SKScene{
@ -105,7 +106,7 @@ class GameScene: SKScene{
body.text = "Schicke \( ((e.component(ofType: SliderComponent.self)?.sliderNode.getValue ?? 0) * CGFloat((e as! Modal).unitCount)).rounded(.up)) Einheiten " body.text = "Schicke \( ((e.component(ofType: SliderComponent.self)?.sliderNode.getValue ?? 0) * CGFloat((e as! Modal).unitCount)).rounded(.up)) Einheiten "
} } } }
let bases = entityManager.getBasesByTeam(for: .team1) let bases = entityManager.getBaseByPlayer(for: GKLocalPlayer.local)
for base in bases { for base in bases {
if atPoint(touchLocation) == base.component(ofType: DefaultBaseComponent.self)?.spriteNode{ if atPoint(touchLocation) == base.component(ofType: DefaultBaseComponent.self)?.spriteNode{