Merge branch '79-verschiebung-der-basen-zuruecksetzen' into 'development'

Resolve "Verschiebung der Basen zuruecksetzen"

Closes #79

See merge request marcel.schwarz/software-projekt-2!85
This commit is contained in:
Marcel Schwarz 2020-05-26 16:54:47 +00:00
commit 067495a57b

View File

@ -46,10 +46,13 @@ class GameScene: SKScene{
if isMoveTouch { if isMoveTouch {
isMoveTouch = false isMoveTouch = false
currentDraggedBase!.component(ofType: DefaultBaseComponent.self)?.spriteNode.position = currentDraggedBase!.position moveFireAndBase(base: currentDraggedBase!, touchLocation: 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)
addAttackDetails(touchLocation: touchLocation) addAttackDetails(touchLocation: touchLocation)
entityManager.getBasesByPlayer(for: GKLocalPlayer.local).forEach({base in
moveFireAndBase(base: base, touchLocation: base.position)
})
} }
else { else {
for entity in entityManager.entities { for entity in entityManager.entities {