Пример #1
0
    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);
            }
        });
    }
Пример #2
0
    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}.");
        }
                                                        );
    }
Пример #3
0
 public static void IncrementAchievement(ColorsAchievements achv, int step = 1)
 {
     socialService?.IncrementAchievement(achv);
 }
Пример #4
0
 public static void UnlockAchievement(ColorsAchievements achv)
 {
     socialService?.UnlockAchievement(achv);
 }
Пример #5
0
 public void UnlockAchievement(ColorsAchievements achv)
 {
     throw new NotImplementedException();
 }
Пример #6
0
 public void IncrementAchievement(ColorsAchievements achv, int step = 1)
 {
     throw new NotImplementedException();
 }