コード例 #1
0
        /// <summary>
        /// Query for a list of achievements for a specific player, including progress towards completion for each achievement.
        ///
        /// @note When the Social Overlay is enabled then this will be called automatically. The Social Overlay is enabled by default (see <see cref="Platform.PlatformFlags.DisableSocialOverlay" />).
        /// </summary>
        /// <param name="options">Structure containing information about the player whose achievements we're retrieving.</param>
        /// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
        /// <param name="completionDelegate">This function is called when the query player achievements operation completes.</param>
        /// <returns>
        /// <see cref="Result.Success" /> if the operation completes successfully
        /// <see cref="Result.InvalidParameters" /> if any of the options are incorrect
        /// </returns>
        public void QueryPlayerAchievements(QueryPlayerAchievementsOptions options, object clientData, OnQueryPlayerAchievementsCompleteCallback completionDelegate)
        {
            var optionsInternal = Helper.CopyProperties <QueryPlayerAchievementsOptionsInternal>(options);

            var completionDelegateInternal = new OnQueryPlayerAchievementsCompleteCallbackInternal(OnQueryPlayerAchievementsComplete);
            var clientDataAddress          = IntPtr.Zero;

            Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);

            EOS_Achievements_QueryPlayerAchievements(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
            Helper.TryMarshalDispose(ref optionsInternal);
        }
コード例 #2
0
        /// <summary>
        /// Query for a list of achievements for a specific player, including progress towards completion for each achievement.
        ///
        /// @note When the Social Overlay is enabled then this will be called automatically. The Social Overlay is enabled by default (see <see cref="Platform.PlatformFlags.DisableSocialOverlay" />).
        /// </summary>
        /// <param name="options">Structure containing information about the player whose achievements we're retrieving.</param>
        /// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
        /// <param name="completionDelegate">This function is called when the query player achievements operation completes.</param>
        /// <returns>
        /// <see cref="Result.Success" /> if the operation completes successfully
        /// <see cref="Result.InvalidProductUserID" /> if any of the userid options are incorrect
        /// <see cref="Result.InvalidParameters" /> if any of the other options are incorrect
        /// </returns>
        public void QueryPlayerAchievements(QueryPlayerAchievementsOptions options, object clientData, OnQueryPlayerAchievementsCompleteCallback completionDelegate)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <QueryPlayerAchievementsOptionsInternal, QueryPlayerAchievementsOptions>(ref optionsAddress, options);

            var clientDataAddress = System.IntPtr.Zero;

            var completionDelegateInternal = new OnQueryPlayerAchievementsCompleteCallbackInternal(OnQueryPlayerAchievementsCompleteCallbackInternalImplementation);

            Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);

            EOS_Achievements_QueryPlayerAchievements(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);

            Helper.TryMarshalDispose(ref optionsAddress);
        }
コード例 #3
0
 internal static extern void EOS_Achievements_QueryPlayerAchievements(System.IntPtr handle, System.IntPtr options, System.IntPtr clientData, OnQueryPlayerAchievementsCompleteCallbackInternal completionDelegate);
コード例 #4
0
 private static extern void EOS_Achievements_QueryPlayerAchievements(IntPtr handle, ref QueryPlayerAchievementsOptionsInternal options, IntPtr clientData, OnQueryPlayerAchievementsCompleteCallbackInternal completionDelegate);