示例#1
0
        /// <summary>
        /// Report a score to game server, using unified id.
        /// </summary>
        /// <param name="_leaderboardGID">An unified string internally used to identify the leaderboard across all the supported platforms.</param>
        /// <param name="_score">The score earned by the local user.</param>
        /// <param name="_onCompletion">Callback that will be called after operation is completed.</param>
        /// <remarks>
        /// \note Works only if, leaderboard metadata was configured in NPSettings or else explicitely set using <see cref="SetLeaderboardMetadataCollection"/>.
        /// </remarks>
        public void ReportScoreWithGlobalID(string _leaderboardGID, long _score, Score.ReportScoreCompletion _onCompletion)
        {
            string _leaderboardID = GameServicesUtils.GetLeaderboardID(_leaderboardGID);

            // Invoke handler
            ReportScore(_leaderboardGID, _leaderboardID, _score, _onCompletion);
        }
示例#2
0
        /// <summary>
        /// Creates a new instance of leaderboard object, using unified id.
        /// </summary>
        /// <param name="_leaderboardGID">An unified string internally used to identify the leaderboard across all the supported platforms.</param>
        /// <remarks>
        /// \note Works only if, leaderboard metadata was configured in NPSettings or else explicitely set using <see cref="SetLeaderboardMetadataCollection"/>.
        /// </remarks>
        public Leaderboard CreateLeaderboardWithGlobalID(string _leaderboardGID)
        {
            string _leaderboardID = GameServicesUtils.GetLeaderboardID(_leaderboardGID);

            return(CreateLeaderboard(_leaderboardGID, _leaderboardID));
        }
示例#3
0
        /// <summary>
        /// Opens standard view to display leaderboard scores corresponding to given unified id.
        /// </summary>
        /// <param name="_leaderboardGID">An unified string internally used to identify the leaderboard across all the supported platforms.</param>
        /// <param name="_timeScope">A time filter used to restrict which scores are displayed to the user.</param>
        /// <param name="_onCompletion">Callback that will be called after operation is completed.</param>
        /// <remarks>
        /// Incase, if you want to list out all the leaderboards that are used in your game, then pass <c>null</c> for leaderboard identifier.
        /// \note Works only if, leaderboard metadata was configured in NPSettings or else explicitely set using <see cref="SetLeaderboardMetadataCollection"/>.
        /// </remarks>
        public void ShowLeaderboardUIWithGlobalID(string _leaderboardGID, eLeaderboardTimeScope _timeScope, GameServiceViewClosed _onCompletion)
        {
            string _leaderboardID = GameServicesUtils.GetLeaderboardID(_leaderboardGID);

            ShowLeaderboardUIWithID(_leaderboardID, _timeScope, _onCompletion);
        }