public void UnlockAchievement(ColorsAchievements achv) { string id = null; switch (achv) { case ColorsAchievements.FirstStep: id = GPGSIds.achievement_first_step; break; case ColorsAchievements.Mixer: id = GPGSIds.achievement_mixer; break; case ColorsAchievements.Shakoy: id = GPGSIds.achievement_shakoy; break; case ColorsAchievements.JustOne10Minutes: id = GPGSIds.achievement_just_one_10_minutes; break; case ColorsAchievements.RushHour: id = GPGSIds.achievement_rush_hour; break; default: throw new ArgumentOutOfRangeException("achv"); } if (alreadyOwned.Contains(id)) { return; } PlayGamesPlatform.Instance.UnlockAchievement(id, ( bool success ) => { Debug.Log($"Did {( ( success ) ? "" : "not " )}unlock achievement: {achv}."); if (success) { alreadyOwned.Add(id); } }); }
public void IncrementAchievement(ColorsAchievements achv, int step = 1) { string id = null; switch (achv) { case ColorsAchievements.ChallengerPractice: id = GPGSIds.achievement_challenger_practice; break; case ColorsAchievements.HundredChallenge: id = GPGSIds.achievement_hundred_challenge; break; case ColorsAchievements.Pi: id = GPGSIds.achievement_pi; break; case ColorsAchievements.Argos: id = GPGSIds.achievement_argos; break; } PlayGamesPlatform.Instance.IncrementAchievement(id, step, ( bool success ) => { Debug.Log($"Did {( ( success ) ? " " : "not " )}unlock achievement: {achv}."); } ); }
public static void IncrementAchievement(ColorsAchievements achv, int step = 1) { socialService?.IncrementAchievement(achv); }
public static void UnlockAchievement(ColorsAchievements achv) { socialService?.UnlockAchievement(achv); }
public void UnlockAchievement(ColorsAchievements achv) { throw new NotImplementedException(); }
public void IncrementAchievement(ColorsAchievements achv, int step = 1) { throw new NotImplementedException(); }