Пример #1
0
        /// <summary>
        /// This should be called each time a new Player is selected.
        /// It will add this game to a list of played games for the Player and
        /// add them to things like the game's Leaderboard.
        /// </summary>
        static public IEnumerator RegisterPlayer(string player_id)
        {
            Player.PlayerRegisterWithApplicationRequest regPlayer = new Player.PlayerRegisterWithApplicationRequest();
            regPlayer.player_id = (player_id);

            //Debug.Log(hdr_request.AccessToken);
            //Debug.Log(hdr_request.AuthToken);
            //Debug.Log(hdr_request.PlayerRegisterWithApplication.PlayerId);
            //Debug.Log ("register Player going off to " + REGISTER_Player_WITH_GAME_URL);

            //UnityEngine.Debug.Log ("register player going off to " + REGISTER_PLAYER_WITH_GAME_URL);
            yield return(GetSingletonInstance().StartCoroutine(
                             CoroutinePostRequest(regPlayer, Response.ParseRegisterPlayerResponse, REGISTER_PLAYER_WITH_GAME_URL, false)));
        }
Пример #2
0
        /// <summary>
        /// This should be called each time a new Player is selected.
        /// It will add this game to a list of played games for the Player and 
        /// add them to things like the game's Leaderboard.
        /// </summary>
        public static IEnumerator RegisterPlayer(string player_id)
        {
            Player.PlayerRegisterWithApplicationRequest regPlayer = new Player.PlayerRegisterWithApplicationRequest();
            regPlayer.player_id = (player_id);

            //Debug.Log(hdr_request.AccessToken);
            //Debug.Log(hdr_request.AuthToken);
            //Debug.Log(hdr_request.PlayerRegisterWithApplication.PlayerId);
            //Debug.Log ("register Player going off to " + REGISTER_Player_WITH_GAME_URL);

            //UnityEngine.Debug.Log ("register player going off to " + REGISTER_PLAYER_WITH_GAME_URL);
            yield return GetSingletonInstance().StartCoroutine(
                CoroutinePostRequest (regPlayer, Response.ParseRegisterPlayerResponse, REGISTER_PLAYER_WITH_GAME_URL, false));
        }