private void OnReceivingAchievements(string _achievementsJsonStr) { IList _achievementsJsonList = JSONUtility.FromJSON(_achievementsJsonStr) as IList; // Send callback if (OnLoadAchievementsFinished != null) { OnLoadAchievementsFinished(AndroidAchievement.ConvertAchievementList(_achievementsJsonList)); } }
internal static AndroidAchievement[] ConvertAchievementList(IList _achievementList) { if (_achievementList == null) { return(null); } int _count = _achievementList.Count; AndroidAchievement[] _androidAchievementList = new AndroidAchievement[_count]; for (int _iter = 0; _iter < _count; _iter++) { _androidAchievementList[_iter] = new AndroidAchievement(_achievementList[_iter] as IDictionary); } return(_androidAchievementList); }
internal static AndroidAchievement[] ConvertAchievementList (IList _achievementList) { if (_achievementList == null) return null; int _count = _achievementList.Count; AndroidAchievement[] _androidAchievementList = new AndroidAchievement[_count]; for (int _iter = 0; _iter < _count; _iter++) { _androidAchievementList[_iter] = new AndroidAchievement(_achievementList[_iter] as IDictionary); } return _androidAchievementList; }
public void ReportProgress (AndroidAchievement _achievement, Action<bool> _onCompletion) { m_reportProgressCallbacks[_achievement.Identifier] = _onCompletion; Plugin.Call(AndroidNativeInfo.Methods.REPORT_PROGRESS, _achievement.Identifier , (float)_achievement.PercentageCompleted, _onCompletion != null); }
public void ReportProgress(AndroidAchievement _achievement, Action <bool> _onCompletion) { m_reportProgressCallbacks[_achievement.Identifier] = _onCompletion; Plugin.Call(AndroidNativeInfo.Methods.REPORT_PROGRESS, _achievement.Identifier, (float)_achievement.PercentageCompleted, _onCompletion != null); }