示例#1
0
 public void Set(QueryPlayerAchievementsOptions other)
 {
     if (other != null)
     {
         m_ApiVersion = AchievementsInterface.QueryplayerachievementsApiLatest;
         UserId       = other.UserId;
     }
 }
        /// <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);
        }