Ejemplo n.º 1
0
        /// <summary>
        /// Stores a Players rank and Players surrounding it based on the call preferences.
        /// By default we only return the Players rank and score.
        /// </summary>
        static public IEnumerator GetPlayerRank(string PlayerId)
        {
            UInt32 surroundingUsers = 0;

            Leaderboard.SortBy sortBy   = Leaderboard.SortBy.NONE;
            UInt32             pageSize = 25;

            Leaderboard.PlayerRankRequest rank = new Leaderboard.PlayerRankRequest();
            rank.count     = (surroundingUsers);
            rank.page_size = (pageSize);
            rank.player_id = (SenseixSession.GetCurrentPlayerID());
            rank.sort_by   = (sortBy);

            //UnityEngine.Debug.Log ("get player rank");

            yield return(GetSingletonInstance().StartCoroutine(
                             CoroutinePostRequest(rank, Response.ParsePlayerRankResponse, GET_PLAYER_RANK_URL, false)));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Stores a Players rank and Players surrounding it based on the call preferences. 
        /// By default we only return the Players rank and score. 	
        /// </summary>
        public static IEnumerator GetPlayerRank( string PlayerId)
        {
            UInt32 surroundingUsers = 0;
            Leaderboard.SortBy sortBy = Leaderboard.SortBy.NONE;
            UInt32 pageSize = 25;

            Leaderboard.PlayerRankRequest rank = new Leaderboard.PlayerRankRequest();
            rank.count = (surroundingUsers);
            rank.page_size =(pageSize);
            rank.player_id = (SenseixSession.GetCurrentPlayerID());
            rank.sort_by = (sortBy);

            //UnityEngine.Debug.Log ("get player rank");

            yield return GetSingletonInstance().StartCoroutine(
                CoroutinePostRequest(rank, Response.ParsePlayerRankResponse, GET_PLAYER_RANK_URL, false));
        }