public static void ReportAchievement(AcheivementKey key, String achievementId, Int32 percentageProgress, Action <Boolean> callback) { if (!Social.IsSocialPlatformAuthenticated()) { return; } UnityEngine.Social.ReportProgress(achievementId, (Double)percentageProgress, callback); }
public AchievementStatusesEnum GetNormalAchievementStatuses(AcheivementKey key) { if (AchievementState.IsSystemAchievement(key)) { return(AchievementStatusesEnum.Invalid); } Int32 achievementIntIndex = this.GetAchievementIntIndex(key); Int32 achievementBitIndex = this.GetAchievementBitIndex(key); return(AchievementState.ConvertDataToAchievementStatus(this.EvtReservedArray[achievementIntIndex], achievementBitIndex)); }
private void ResetSteamAchievements() { SteamLocalUser steamLocalUser = UnityEngine.Social.Active.localUser as SteamLocalUser; if (steamLocalUser != null) { foreach (Object obj in Enum.GetValues(typeof(AcheivementKey))) { AcheivementKey key = (AcheivementKey)((Int32)obj); steamLocalUser.ClearAchievement(AchievementManager.GetRefKeyForPlatform(key)); } } }
public void SetNormalAchievementStatuses(AcheivementKey key, AchievementStatusesEnum status) { if (AchievementState.IsSystemAchievement(key)) { return; } Int32 achievementIntIndex = this.GetAchievementIntIndex(key); Int32 achievementBitIndex = this.GetAchievementBitIndex(key); Int32 num = AchievementState.ConvertAchievementStatusToData(status, achievementBitIndex); Int32 num2 = 3 << achievementBitIndex; this.EvtReservedArray[achievementIntIndex] &= ~num2; this.EvtReservedArray[achievementIntIndex] |= num; }
private Int32 GetAchievementBitIndex(AcheivementKey key) { return((Int32)((Int32)key * (Int32)AcheivementKey.BlkMag100 % (Int32)AcheivementKey.Rope100)); }
private Int32 GetAchievementIntIndex(AcheivementKey key) { Int32 num = (Int32)((Int32)key * (Int32)AcheivementKey.BlkMag100 / (Int32)AcheivementKey.Rope100); return(2 + num); }
public static Boolean IsSystemAchievement(AcheivementKey key) { return(key == AcheivementKey.CompleteGame || key == AcheivementKey.Blackjack); }