Skip to content

Commit

Permalink
Merge pull request #122 from Vanessamae23/main
Browse files Browse the repository at this point in the history
Fix logic
  • Loading branch information
zheng-ze authored Apr 20, 2024
2 parents 7303637 + ba81783 commit f27d41e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file not shown.
2 changes: 1 addition & 1 deletion TowerForge/TowerForge/GameViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ extension GameViewController: SceneManagerDelegate {
}
func showGameOverScene(isWin: Bool, results: [GameResult]) {
let gameOverScene = GameOverScene(win: isWin, results: results)
if let data = self.playerData {
if isWin, let data = self.playerData {
for result in results {
if let leaderboardResult = result as? LeaderboardResult, let score = Double(leaderboardResult.value) {
let rank = GameRankProvider(type: leaderboardResult.variable)
Expand Down

0 comments on commit f27d41e

Please sign in to comment.