Reset all bases when moveTouch is finished
This commit is contained in:
parent
bb9582bee9
commit
2c31d923c6
@ -46,10 +46,13 @@ class GameScene: SKScene{
|
||||
|
||||
if isMoveTouch {
|
||||
isMoveTouch = false
|
||||
currentDraggedBase!.component(ofType: DefaultBaseComponent.self)?.spriteNode.position = currentDraggedBase!.position
|
||||
currentDraggedBase!.component(ofType: TeamComponent.self)?.fire.position = currentDraggedBase!.position
|
||||
currentDraggedBase!.component(ofType: DefaultBaseComponent.self)?.labelNode?.position = CGPoint(x: currentDraggedBase!.position.x + 30, y: currentDraggedBase!.position.y - 50)
|
||||
moveFireAndBase(base: currentDraggedBase!, touchLocation: currentDraggedBase!.position)
|
||||
|
||||
addAttackDetails(touchLocation: touchLocation)
|
||||
|
||||
entityManager.getBasesByPlayer(for: GKLocalPlayer.local).forEach({base in
|
||||
moveFireAndBase(base: base, touchLocation: base.position)
|
||||
})
|
||||
}
|
||||
else {
|
||||
for entity in entityManager.entities {
|
||||
|
Loading…
Reference in New Issue
Block a user