Pfusch von Aldin.D
This commit is contained in:
parent
3082297415
commit
48e6247b69
@ -30,7 +30,9 @@ class RoundTimer: Timer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func stopTimer() {
|
func stopTimer() {
|
||||||
|
guard timer != nil else { return }
|
||||||
timer?.invalidate()
|
timer?.invalidate()
|
||||||
|
timer = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func resumeTimer() {
|
func resumeTimer() {
|
||||||
|
@ -243,6 +243,8 @@ class GameScene: SKScene{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@objc func pauseGame() -> Void {
|
@objc func pauseGame() -> Void {
|
||||||
|
entityManager.removeModal()
|
||||||
|
entityManager.getHUD()?.roundTimer.stopTimer()
|
||||||
entityManager.add(Modal(modaltype: .PauseGame,
|
entityManager.add(Modal(modaltype: .PauseGame,
|
||||||
base: nil,
|
base: nil,
|
||||||
anchorPoint: CGPoint(x: self.size.width / 2 , y: self.size.height / 2),
|
anchorPoint: CGPoint(x: self.size.width / 2 , y: self.size.height / 2),
|
||||||
@ -251,7 +253,6 @@ class GameScene: SKScene{
|
|||||||
touchLocation: nil,
|
touchLocation: nil,
|
||||||
collisionBase: nil
|
collisionBase: nil
|
||||||
))
|
))
|
||||||
entityManager.getHUD()?.roundTimer.stopTimer()
|
|
||||||
}
|
}
|
||||||
@objc func resumeGame() -> Void {
|
@objc func resumeGame() -> Void {
|
||||||
entityManager.removeModal()
|
entityManager.removeModal()
|
||||||
|
Loading…
Reference in New Issue
Block a user