diff --git a/GoldWars/GoldWars/Scenes/GameScene.swift b/GoldWars/GoldWars/Scenes/GameScene.swift index c19dd10..8991eea 100644 --- a/GoldWars/GoldWars/Scenes/GameScene.swift +++ b/GoldWars/GoldWars/Scenes/GameScene.swift @@ -336,16 +336,18 @@ class GameScene: SKScene{ @objc func pauseGame() -> Void { - entityManager.removeModal() - entityManager.getHUD()?.roundTimer.stopTimer() - entityManager.add(Modal(modaltype: .PauseGame, - base: nil, - anchorPoint: CGPoint(x: self.size.width / 2 , y: self.size.height / 2), - gameScene: self, - currentDraggedBase: nil, - touchLocation: nil, - collisionBase: nil - )) + if !GameCenterManager.sharedInstance.gameEnded { + entityManager.removeModal() + entityManager.getHUD()?.roundTimer.stopTimer() + entityManager.add(Modal(modaltype: .PauseGame, + base: nil, + anchorPoint: CGPoint(x: self.size.width / 2 , y: self.size.height / 2), + gameScene: self, + currentDraggedBase: nil, + touchLocation: nil, + collisionBase: nil + )) + } } @objc func resumeGame() -> Void {