Ejemplo n.º 1
0
 private void OnAchievementStored(UserAchievementStored_t callback)
 {
     if ((ulong)_gameID == callback.m_nGameID)
     {
         if (0 == callback.m_nMaxProgress)
         {
             TBServiceManager.UpdateAchievementList(callback.m_rgchAchievementName, true);
             Debug.Log("Achievement '" + callback.m_rgchAchievementName + "' unlocked!");
         }
         else
         {
             Debug.Log("Achievement '" + callback.m_rgchAchievementName + "' progress callback, (" + callback.m_nCurProgress + "," + callback.m_nMaxProgress + ")");
         }
     }
 }
Ejemplo n.º 2
0
 public override void UnlockAchievement(string token)
 {
     base.UnlockAchievement(token);
     Achievements.Unlock(token).OnComplete((Message <AchievementUpdate> msg) =>
     {
         if (msg.IsError)
         {
             Debug.LogError("Oculus Platform services encountered an error while trying to unlock the achievement!");
         }
         else
         {
             TBLogging.LogMessage("Achievement unlocked!");
             TBServiceManager.UpdateAchievementList(token, msg.Data.JustUnlocked);
         }
     });
 }