FIX pauseGame Modal in GameEnd View

This commit is contained in:
Niko Jochim 2020-06-26 02:55:02 +02:00
parent 67c400a069
commit c7aa992790

View File

@ -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 {