public void Login() { #if UNITY_IPHONE && API_SCORE_GAMECENTER if (!GameCenterBinding.isPlayerAuthenticated()) { ZedLogger.Log("trying to authenticate local player"); GameCenterBinding.authenticateLocalPlayer(false); GameCenterBinding.showCompletionBannerForAchievements(); } #endif }
public void UnlockAchievement(string achievementID) { #if UNITY_IPHONE && API_SCORE_GAMECENTER if (!Enabled) { return; } if (achievementID != null) { GameCenterBinding.reportAchievement(achievementID, 100f); GameCenterBinding.showCompletionBannerForAchievements(); } #endif }
void ReportAchievement(string achievementID) { #if UNITY_IOS && GAMECENTER if (!GameCenterBinding.isPlayerAuthenticated()) { GameCenterBinding.authenticateLocalPlayer(); } GameCenterBinding.reportAchievement(achievementID, 100f); GameCenterBinding.showCompletionBannerForAchievements(); #endif #if UNITY_ANDROID #if GPGSERVIES && !AMAZONSTORE PlayGameServices.unlockAchievement(achievementID, true); #endif #endif }
// Shows a completion banner for achievements if when reported they are at 100%. Only has an effect on iOS 5+ public void ShowCompletionBannerForAchevements() { GameCenterBinding.showCompletionBannerForAchievements(); }