Skip to content

Commit

Permalink
Fix bug where time will jump forward by the time that the game is pau…
Browse files Browse the repository at this point in the history
…sed for.
  • Loading branch information
zheng-ze committed Apr 7, 2024
1 parent 1ab6d3b commit abdda05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TowerForge/TowerForge/Scenes/GameScene.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ class GameScene: SKScene {

override func update(_ currentTime: TimeInterval) {
if statePopupDelegate?.isPaused ?? false {
lastUpdatedTimeInterval = currentTime
return
}

if lastUpdatedTimeInterval == TimeInterval(0) {
lastUpdatedTimeInterval = currentTime
}
Expand Down

0 comments on commit abdda05

Please sign in to comment.