public void ShowAchievementsUI() { if (this.VerifyAuthentication()) { GameCenterPlatform.Internal_ShowAchievementsUI(); } }
private static void TriggerResetAchievementCallback(bool result) { if (GameCenterPlatform.s_ResetAchievements != null) { GameCenterPlatform.s_ResetAchievements(result); } }
public void ShowLeaderboardUI() { if (this.VerifyAuthentication()) { GameCenterPlatform.Internal_ShowLeaderboardUI(); } }
private static void PopulateLocalUser() { GameCenterPlatform.m_LocalUser.SetAuthenticated(GameCenterPlatform.GetAuthenticated()); GameCenterPlatform.m_LocalUser.SetUserName(GameCenterPlatform.Internal_UserName()); GameCenterPlatform.m_LocalUser.SetUserID(GameCenterPlatform.Internal_UserID()); GameCenterPlatform.m_LocalUser.SetUnderage(GameCenterPlatform.GetIsUnderage()); GameCenterPlatform.m_LocalUser.SetImage(GameCenterPlatform.GetUserImage()); }
public void ShowAchievementsUI() { bool flag = !this.VerifyAuthentication(); if (!flag) { GameCenterPlatform.Internal_ShowAchievementsUI(); } }
public void ShowLeaderboardUI() { bool flag = !this.VerifyAuthentication(); if (!flag) { GameCenterPlatform.Internal_ShowLeaderboardUI(); } }
private static void AuthenticateCallbackWrapper(int result, string error) { GameCenterPlatform.PopulateLocalUser(); if (GameCenterPlatform.s_AuthenticateCallback != null) { GameCenterPlatform.s_AuthenticateCallback(result == 1, error); GameCenterPlatform.s_AuthenticateCallback = null; } }
public static void ResetAllAchievements(Action <bool> callback) { GameCenterPlatform.s_ResetAchievements = callback; GameCenterPlatform.ResetAllAchievements(); Debug.Log("ResetAllAchievements - no effect in editor"); if (callback != null) { callback(true); } }
void ISocialPlatform.LoadFriends(ILocalUser user, Action <bool> callback) { if (!this.VerifyAuthentication()) { if (callback != null) { callback(false); } } else { GameCenterPlatform.LoadFriends(callback); } }
public void LoadScores(string category, Action <IScore[]> callback) { if (!this.VerifyAuthentication()) { if (callback != null) { callback(new Score[0]); } } else { GameCenterPlatform.InternalLoadScores(category, callback); } }
public void ReportScore(long score, string board, Action <bool> callback) { if (!this.VerifyAuthentication()) { if (callback != null) { callback(false); } } else { GameCenterPlatform.InternalReportScore(score, board, callback); } }
public void LoadAchievements(Action <IAchievement[]> callback) { if (!this.VerifyAuthentication()) { if (callback != null) { callback(new Achievement[0]); } } else { GameCenterPlatform.InternalLoadAchievements(callback); } }
public void ReportProgress(string id, double progress, Action <bool> callback) { if (!this.VerifyAuthentication()) { if (callback != null) { callback(false); } } else { GameCenterPlatform.InternalReportProgress(id, progress, callback); } }
public void LoadUsers(string[] userIds, Action <IUserProfile[]> callback) { if (!this.VerifyAuthentication()) { if (callback != null) { callback(new UserProfile[0]); } } else { GameCenterPlatform.Internal_LoadUsers(userIds, callback); } }
void ISocialPlatform.LoadFriends(ILocalUser user, Action <bool> callback) { bool flag = !this.VerifyAuthentication(); if (flag) { bool flag2 = callback != null; if (flag2) { callback(false); } } else { GameCenterPlatform.LoadFriends(callback); } }
public void LoadScores(string category, Action <IScore[]> callback) { bool flag = !this.VerifyAuthentication(); if (flag) { bool flag2 = callback != null; if (flag2) { IScore[] obj = new Score[0]; callback(obj); } } else { GameCenterPlatform.InternalLoadScores(category, callback); } }
public void LoadAchievements(Action <IAchievement[]> callback) { bool flag = !this.VerifyAuthentication(); if (flag) { bool flag2 = callback != null; if (flag2) { IAchievement[] obj = new Achievement[0]; callback(obj); } } else { GameCenterPlatform.InternalLoadAchievements(callback); } }
public void LoadUsers(string[] userIds, Action <IUserProfile[]> callback) { bool flag = !this.VerifyAuthentication(); if (flag) { bool flag2 = callback != null; if (flag2) { IUserProfile[] obj = new UserProfile[0]; callback(obj); } } else { GameCenterPlatform.Internal_LoadUsers(userIds, callback); } }
void InitializeSettings () { // For now Social settings are only used for Game Center. if (Application.platform == RuntimePlatform.IPhonePlayer) { var settings = LumosPowerups.powerups["social"].settings; var gameCenterKey = "use_game_center"; if (settings != null && settings.ContainsKey(gameCenterKey)) { useGameCenter = System.Convert.ToBoolean(settings[gameCenterKey]); } if (useGameCenter) { gameCenterPlatform = new GameCenterPlatform(); gameCenterPlatform.localUser.Authenticate(success => { if (success) { LumosUnity.Debug.Log("Authenticated with game center."); } }); } } }
public static void ShowLeaderboardUI(string leaderboardID, TimeScope timeScope) { GameCenterPlatform.ShowSpecificLeaderboardUI(leaderboardID, (int)timeScope); Debug.Log("ShowLeaderboardUI - no effect in editor"); }
public static void ShowDefaultAchievementCompletionBanner(bool value) { GameCenterPlatform.ShowDefaultAchievementBanner(value); Debug.Log("ShowDefaultAchievementCompletionBanner - no effect in editor"); }
private static void ClearFriends(int size) { GameCenterPlatform.SafeClearArray(ref GameCenterPlatform.s_friends, size); }
private static void SetUserImage(Texture2D texture, int number) { GameCenterPlatform.SafeSetUserImage(ref GameCenterPlatform.s_users, texture, number); }
private static void ClearUsers(int size) { GameCenterPlatform.SafeClearArray(ref GameCenterPlatform.s_users, size); }
void ISocialPlatform.Authenticate(ILocalUser user, Action <bool, string> callback) { GameCenterPlatform.s_AuthenticateCallback = callback; GameCenterPlatform.Authenticate(); }