/// <summary> /// Loads the Achievement descriptions. /// <param name="callback">The callback to receive the descriptions</param> /// </summary> public void LoadAchievementDescriptions(Action <IAchievementDescription[]> callback) { if (!IsAuthenticated()) { Logger.e("LoadAchievementDescriptions can only be called after authentication."); callback.Invoke(null); } mClient.LoadAchievements(ach => { IAchievementDescription[] data = new IAchievementDescription[ach.Length]; for (int i = 0; i < data.Length; i++) { data[i] = new PlayGamesAchievement(ach[i]); } callback.Invoke(data); }); }
public void LoadAchievementDescriptions(Action <IAchievementDescription[]> callback) { if (!IsAuthenticated()) { Logger.e("LoadAchievementDescriptions can only be called after authentication."); if (callback != null) { callback(null); } } else { mClient.LoadAchievements(delegate(Achievement[] ach) { IAchievementDescription[] array = (IAchievementDescription[])new IAchievementDescription[ach.Length]; for (int i = 0; i < array.Length; i++) { array[i] = new PlayGamesAchievement(ach[i]); } callback(array); }); } }