diff --git a/AchivementHelper.swift b/AchivementHelper.swift index 7e50d58..683bf29 100644 --- a/AchivementHelper.swift +++ b/AchivementHelper.swift @@ -50,9 +50,9 @@ enum Achievement: String { case CreditWatch private func getPercentage(gameStatistic: GameStatistics, maxValue: Double) -> Double { - let percent: Double = Double(gameStatistic.getValue()) / maxValue - if percent > 1.0 { - return 1.0 + let percent: Double = (Double(gameStatistic.getValue()) / maxValue) * 100.0 + if percent > 100.0 { + return 100.0 } return percent @@ -206,9 +206,9 @@ class AchievementHelper { case .Gold: achievement = Achievement.YellowPlaneGoldMedal.gkAchievement case .Silver: - achievement = Achievement.YellowPlaneGoldMedal.gkAchievement + achievement = Achievement.YellowPlaneSilverMedal.gkAchievement case .Bronze: - achievement = Achievement.YellowPlaneGoldMedal.gkAchievement + achievement = Achievement.YellowPlaneBronzeMedal.gkAchievement default: break } } @@ -335,10 +335,10 @@ class AchievementHelper { achievements.appendContentsOf(bluePlaneFlightAchievements()) case .Yellow: - achievements.appendContentsOf(redPlaneFlightAchievements()) + achievements.appendContentsOf(yellowPlaneFlightAchievements()) case .Green: - achievements.appendContentsOf(redPlaneFlightAchievements()) + achievements.appendContentsOf(greenPlaneFlightAchievements()) } return achievements diff --git a/GameStatistics.swift b/GameStatistics.swift index 0e19b4d..f2ecb1a 100644 --- a/GameStatistics.swift +++ b/GameStatistics.swift @@ -25,7 +25,6 @@ enum GameStatistics: String { private func setValue(value: Int) { NSUserDefaults.standardUserDefaults().setInteger(value, forKey: self.rawValue) - print("\(self.rawValue) value: \(value)") } func increaseCountByOne() { diff --git a/OhMyPlane.xcodeproj/project.pbxproj b/OhMyPlane.xcodeproj/project.pbxproj index 4ba3627..a1c80f9 100644 --- a/OhMyPlane.xcodeproj/project.pbxproj +++ b/OhMyPlane.xcodeproj/project.pbxproj @@ -11,7 +11,6 @@ A42DE6611CCDD8F80088AD76 /* GameKitHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = A42DE6601CCDD8F80088AD76 /* GameKitHelper.swift */; }; A42DE6621CCDD8F80088AD76 /* GameKitHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = A42DE6601CCDD8F80088AD76 /* GameKitHelper.swift */; }; A42DE6651CCE11970088AD76 /* AchivementHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = A42DE6641CCE11970088AD76 /* AchivementHelper.swift */; }; - A42DE6671CCF51320088AD76 /* GameKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A42DE6661CCF51320088AD76 /* GameKit.framework */; }; A435C0621CBF61DF002EFCCF /* TVControlsScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = A435C0611CBF61DF002EFCCF /* TVControlsScene.swift */; }; A435C0631CBF61DF002EFCCF /* TVControlsScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = A435C0611CBF61DF002EFCCF /* TVControlsScene.swift */; }; A435C0661CBF6248002EFCCF /* GameScene+TVControlsScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = A435C0651CBF6248002EFCCF /* GameScene+TVControlsScene.swift */; }; @@ -26,6 +25,7 @@ A43735E41CA43F15005F5BC1 /* obstacle.atlas in Resources */ = {isa = PBXBuildFile; fileRef = A43735E31CA43F15005F5BC1 /* obstacle.atlas */; }; A43735E61CA51BA3005F5BC1 /* PauseGame.swift in Sources */ = {isa = PBXBuildFile; fileRef = A43735E51CA51BA3005F5BC1 /* PauseGame.swift */; }; A43735EA1CA51BC8005F5BC1 /* FailGame.swift in Sources */ = {isa = PBXBuildFile; fileRef = A43735E91CA51BC8005F5BC1 /* FailGame.swift */; }; + A44AC67B1CD9B8FC00756161 /* GameKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A44AC67A1CD9B8FC00756161 /* GameKit.framework */; }; A46711BD1CC8BC3D005A0E6A /* GameKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A46711BC1CC8BC3D005A0E6A /* GameKit.framework */; }; A48DA0161CBE222B000DCCED /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A48DA0151CBE222B000DCCED /* AppDelegate.swift */; }; A48DA01C1CBE222B000DCCED /* GameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A48DA01B1CBE222B000DCCED /* GameViewController.swift */; }; @@ -105,7 +105,6 @@ /* Begin PBXFileReference section */ A42DE6601CCDD8F80088AD76 /* GameKitHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GameKitHelper.swift; sourceTree = ""; }; A42DE6641CCE11970088AD76 /* AchivementHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AchivementHelper.swift; sourceTree = ""; }; - A42DE6661CCF51320088AD76 /* GameKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameKit.framework; path = System/Library/Frameworks/GameKit.framework; sourceTree = SDKROOT; }; A435C0611CBF61DF002EFCCF /* TVControlsScene.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TVControlsScene.swift; sourceTree = ""; }; A435C0651CBF6248002EFCCF /* GameScene+TVControlsScene.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "GameScene+TVControlsScene.swift"; sourceTree = ""; }; A435C0671CBF62AE002EFCCF /* MainScene+TVControlsScene.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "MainScene+TVControlsScene.swift"; sourceTree = ""; }; @@ -119,6 +118,7 @@ A43735E31CA43F15005F5BC1 /* obstacle.atlas */ = {isa = PBXFileReference; lastKnownFileType = folder.skatlas; name = obstacle.atlas; path = ../Shared/obstacle.atlas; sourceTree = ""; }; A43735E51CA51BA3005F5BC1 /* PauseGame.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; name = PauseGame.swift; path = ../Shared/PauseGame.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; A43735E91CA51BC8005F5BC1 /* FailGame.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; name = FailGame.swift; path = ../Shared/FailGame.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; + A44AC67A1CD9B8FC00756161 /* GameKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameKit.framework; path = System/Library/Frameworks/GameKit.framework; sourceTree = SDKROOT; }; A46711BC1CC8BC3D005A0E6A /* GameKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameKit.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.2.sdk/System/Library/Frameworks/GameKit.framework; sourceTree = DEVELOPER_DIR; }; A48DA0131CBE222B000DCCED /* OhMyPlaneTv.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OhMyPlaneTv.app; sourceTree = BUILT_PRODUCTS_DIR; }; A48DA0151CBE222B000DCCED /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -179,7 +179,7 @@ buildActionMask = 2147483647; files = ( A49008001CD4C9310046DAC8 /* SKTUtilsExtended.framework in Frameworks */, - A42DE6671CCF51320088AD76 /* GameKit.framework in Frameworks */, + A44AC67B1CD9B8FC00756161 /* GameKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -259,7 +259,6 @@ children = ( A49007FF1CD4C9310046DAC8 /* SKTUtilsExtended.framework */, A49007FD1CD4C9230046DAC8 /* SKTUtilsExtended.framework */, - A42DE6661CCF51320088AD76 /* GameKit.framework */, A46711BC1CC8BC3D005A0E6A /* GameKit.framework */, ); name = framework; @@ -268,6 +267,7 @@ A496E8D01CA228C800A448F5 = { isa = PBXGroup; children = ( + A44AC67A1CD9B8FC00756161 /* GameKit.framework */, A48DA0281CBE2261000DCCED /* Share */, A496E8DB1CA228C800A448F5 /* OhMyPlane */, A48DA0141CBE222B000DCCED /* OhMyPlaneTv */, diff --git a/OhMyPlane/Info.plist b/OhMyPlane/Info.plist index 123089e..98e25bd 100644 --- a/OhMyPlane/Info.plist +++ b/OhMyPlane/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.2 + 1.3 CFBundleSignature ???? CFBundleVersion - 4 + 2 ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS diff --git a/OhMyPlaneTv/Info.plist b/OhMyPlaneTv/Info.plist index 50c728d..9d32f87 100644 --- a/OhMyPlaneTv/Info.plist +++ b/OhMyPlaneTv/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.2 + 1.3 CFBundleSignature ???? CFBundleVersion - 4 + 2 ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS