Exemple #1
0
 public static PXR_Request <PXR_AchievementUpdate> Init()
 {
     if (PXR_AchievementCore.IsInitialized())
     {
         return(new PXR_Request <PXR_AchievementUpdate>(PXR_AchievementAPI.Init()));
     }
     return(null);
 }
 public PXR_AchievementProgress(AndroidJavaObject msg)
 {
     Bitfield   = PXR_AchievementAPI.pvr_AchievementProgress_GetBitfield(msg);
     Count      = PXR_AchievementAPI.pvr_AchievementProgress_GetCount(msg);
     IsUnlocked = PXR_AchievementAPI.pvr_AchievementProgress_GetIsUnlocked(msg);
     Name       = PXR_AchievementAPI.pvr_AchievementProgress_GetName(msg);
     UnlockTime = PXR_AchievementAPI.pvr_AchievementProgress_GetUnlockTime(msg);
 }
 public PXR_AchievementProgress(AndroidJavaObject msg)
 {
     bitfield   = PXR_AchievementAPI.UPxr_AchievementProgressGetBitfield(msg);
     count      = PXR_AchievementAPI.UPxr_AchievementProgressGetCount(msg);
     isUnlocked = PXR_AchievementAPI.UPxr_AchievementProgressGetIsUnlocked(msg);
     name       = PXR_AchievementAPI.UPxr_AchievementProgressGetName(msg);
     unlockTime = PXR_AchievementAPI.UPxr_AchievementProgressGetUnlockTime(msg);
 }
Exemple #4
0
        /// <summary>
        /// Get all definitions of achievements.
        /// </summary>
        /// <returns></returns>
        public static PXR_Request <PXR_AchievementDefinitionList> GetAllDefinitions()
        {
            if (PXR_AchievementCore.IsInitialized())
            {
                return(new PXR_Request <PXR_AchievementDefinitionList>(PXR_AchievementAPI.UPxr_AchievementsGetAllDefinitions()));
            }

            return(null);
        }
Exemple #5
0
        /// <summary>
        /// Get achievement progress by name.
        /// </summary>
        /// <param name="names"></param>
        /// <returns></returns>
        public static PXR_Request <PXR_AchievementProgressList> GetProgressByName(string[] names)
        {
            if (PXR_AchievementCore.IsInitialized())
            {
                return(new PXR_Request <PXR_AchievementProgressList>(PXR_AchievementAPI.UPxr_AchievementsGetProgressByName(names, (names != null ? names.Length : 0))));
            }

            return(null);
        }
Exemple #6
0
        /// Request the achievement definitions that match the specified names.
        ///
        public static PXR_Request <PXR_AchievementDefinitionList> GetDefinitionsByName(string[] names)
        {
            if (PXR_AchievementCore.IsInitialized())
            {
                return(new PXR_Request <PXR_AchievementDefinitionList>(PXR_AchievementAPI.pvr_Achievements_GetDefinitionsByName(names, (names != null ? names.Length : 0))));
            }

            return(null);
        }
Exemple #7
0
        /// Request the progress for the user on all achievements in the app.
        ///
        public static PXR_Request <PXR_AchievementProgressList> GetAllProgress()
        {
            if (PXR_AchievementCore.IsInitialized())
            {
                return(new PXR_Request <PXR_AchievementProgressList>(PXR_AchievementAPI.pvr_Achievements_GetAllProgress()));
            }

            return(null);
        }
Exemple #8
0
        /*Add 'count' to the achievement with the given name. This must be a COUNT
         * achievement. The largest number that is supported by this method is the max
         * value of a signed 64-bit integer. If the number is larger than that, it is
         * clamped to that max value before being passed to the servers.
         */
        public static PXR_Request <PXR_AchievementUpdate> AddCount(string name, long count)
        {
            if (PXR_AchievementCore.IsInitialized())
            {
                return(new PXR_Request <PXR_AchievementUpdate>(PXR_AchievementAPI.pvr_Achievements_AddCount(name, count)));
            }

            return(null);
        }
Exemple #9
0
        /// Unlock fields of a BITFIELD achievement.
        /// \param name The name of the achievement to unlock
        /// \param fields A string containing either '0' or '1' characters. Every '1' will unlock the field in the corresponding position.
        ///
        public static PXR_Request <PXR_AchievementUpdate> AddFields(string name, string fields)
        {
            if (PXR_AchievementCore.IsInitialized())
            {
                return(new PXR_Request <PXR_AchievementUpdate>(PXR_AchievementAPI.pvr_Achievements_AddFields(name, fields)));
            }

            return(null);
        }
Exemple #10
0
        /// Unlock the achievement with the given name. This can be of any achievement
        /// type.
        ///
        public static PXR_Request <PXR_AchievementUpdate> Unlock(string name)
        {
            if (PXR_AchievementCore.IsInitialized())
            {
                return(new PXR_Request <PXR_AchievementUpdate>(PXR_AchievementAPI.pvr_Achievements_Unlock(name)));
            }

            return(null);
        }
        public PXR_AchievementProgressList(AndroidJavaObject msg)
        {
            var count = PXR_AchievementAPI.UPxr_AchievementProgressArrayGetSize(msg);

            data = new List <PXR_AchievementProgress>(count);
            for (int i = 0; i < count; i++)
            {
                data.Add(new PXR_AchievementProgress(PXR_AchievementAPI.UPxr_AchievementProgressArrayGetElement(msg, i)));
            }
            nextUrl = PXR_AchievementAPI.UPxr_AchievementProgressArrayGetNextUrl(msg);
        }
Exemple #12
0
        public PXR_AchievementDefinitionList(AndroidJavaObject msg)
        {
            var count = PXR_AchievementAPI.pvr_AchievementDefinitionArray_GetSize(msg);

            data = new List <PXR_AchievementDefinition>(count);
            for (int i = 0; i < count; i++)
            {
                data.Add(new PXR_AchievementDefinition(PXR_AchievementAPI.pvr_AchievementDefinitionArray_GetElement(msg, i)));
            }

            nextUrl = PXR_AchievementAPI.pvr_AchievementDefinitionArray_GetNextUrl(msg);
        }
Exemple #13
0
 public PXR_AchievementDefinition(AndroidJavaObject msg)
 {
     type                = PXR_AchievementAPI.UPxr_AchievementDefinitionGetType(msg);
     name                = PXR_AchievementAPI.UPxr_AchievementDefinitionGetName(msg);
     bitfieldLength      = PXR_AchievementAPI.UPxr_AchievementDefinitionGetBitfieldLength(msg);
     target              = PXR_AchievementAPI.UPxr_AchievementDefinitionGetTarget(msg);
     title               = PXR_AchievementAPI.UPxr_AchievementDefinitionGetTitle(msg);
     description         = PXR_AchievementAPI.UPxr_AchievementDefinitionGetDescription(msg);
     unlockedDescription = PXR_AchievementAPI.UPxr_AchievementDefinitionGetUnlockedDescription(msg);
     unlockedIcon        = PXR_AchievementAPI.UPxr_AchievementDefinitionGetUnlockedIcon(msg);
     lockedIcon          = PXR_AchievementAPI.UPxr_AchievementDefinitionGetLockedIcon(msg);
     isSecrect           = PXR_AchievementAPI.UPxr_AchievementDefinitionGetIsSecrect(msg);
 }
Exemple #14
0
 public PXR_AchievementDefinition(AndroidJavaObject msg)
 {
     Type                = PXR_AchievementAPI.pvr_AchievementDefinition_GetType(msg);
     Name                = PXR_AchievementAPI.pvr_AchievementDefinition_GetName(msg);
     BitfieldLength      = PXR_AchievementAPI.pvr_AchievementDefinition_GetBitfieldLength(msg);
     Target              = PXR_AchievementAPI.pvr_AchievementDefinition_GetTarget(msg);
     Title               = PXR_AchievementAPI.pvr_AchievementDefinition_GetTitle(msg);
     Description         = PXR_AchievementAPI.pvr_AchievementDefinition_GetDescription(msg);
     UnlockedDescription = PXR_AchievementAPI.pvr_AchievementDefinition_GetUnlockedDescription(msg);
     UnlockedIcon        = PXR_AchievementAPI.pvr_AchievementDefinition_GetUnlockedIcon(msg);
     LockedIcon          = PXR_AchievementAPI.pvr_AchievementDefinition_GetLockedIcon(msg);
     IsSecrect           = PXR_AchievementAPI.pvr_AchievementDefinition_GetIsSecrect(msg);
 }
Exemple #15
0
        public static PXR_Request <PXR_AchievementProgressList> GetNextAchievementProgressListPage(PXR_AchievementProgressList list)
        {
            if (!list.HasNextPage)
            {
                Debug.LogWarning("Platform.GetNextAchievementProgressListPage: List has no next page");
                return(null);
            }

            if (PXR_AchievementCore.IsInitialized())
            {
                return(new PXR_Request <PXR_AchievementProgressList>(
                           PXR_AchievementAPI.pvr_HTTP_GetWithMessageType(
                               list.NextUrl,
                               PXR_Message.MessageType.Achievements_GetNextAchievementProgressArrayPage
                               )
                           ));
            }

            return(null);
        }
 public PXR_AchievementUpdate(AndroidJavaObject msg)
 {
     JustUnlocked = PXR_AchievementAPI.pvr_AchievementUpdate_GetJustUnlocked(msg);
     Name         = PXR_AchievementAPI.pvr_AchievementUpdate_GetName(msg);
 }
 public PXR_AchievementUpdate(AndroidJavaObject msg)
 {
     justUnlocked = PXR_AchievementAPI.UPxr_AchievementUpdateGetJustUnlocked(msg);
     name         = PXR_AchievementAPI.UPxr_AchievementUpdateGetName(msg);
 }
Exemple #18
0
 public static void UnRegisterNetwork()
 {
     PXR_AchievementAPI.UnRegisterNetwork();
 }
Exemple #19
0
 protected override string GetDataFromMessage(AndroidJavaObject msg)
 {
     return(PXR_AchievementAPI.pvr_Message_GetString(msg));
 }