Ejemplo n.º 1
0
 public override void Show(Action <int> closeEvent, float sizeX, float sizeY, float showAnimationTime)
 {
     GUICollider.DisableAllCollider("CMD_Profile");
     RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
     base.HideDLG();
     GameWebAPI.RequestUS_UserProfile requestUS_UserProfile = new GameWebAPI.RequestUS_UserProfile();
     requestUS_UserProfile.SetSendData = delegate(GameWebAPI.PRF_Req_ProfileData param)
     {
         param.targetUserId = DataMng.Instance().RespDataCM_Login.playerInfo.UserId;
     };
     requestUS_UserProfile.OnReceived = new Action <GameWebAPI.RespDataPRF_Profile>(DataMng.Instance().SetUserProfile);
     GameWebAPI.RequestUS_UserProfile request = requestUS_UserProfile;
     base.StartCoroutine(request.RunOneTime(delegate()
     {
         RestrictionInput.EndLoad();
         this.ShowDLG();
         this.SetTutorialAnyTime("anytime_second_tutorial_profile");
         this.< Show > __BaseCallProxy0(closeEvent, sizeX, sizeY, showAnimationTime);
     }, delegate(Exception nop)
     {
         RestrictionInput.EndLoad();
         this.< ClosePanel > __BaseCallProxy1(false);
         GUICollider.EnableAllCollider("CMD_Profile");
     }, null));
 }
Ejemplo n.º 2
0
 public APIRequestTask RequestFriendProfile(string friendUserId, Action <GameWebAPI.RespDataPRF_Profile> onResponse, bool requestRetry = true)
 {
     GameWebAPI.RequestUS_UserProfile request = new GameWebAPI.RequestUS_UserProfile
     {
         SetSendData = delegate(GameWebAPI.PRF_Req_ProfileData param)
         {
             param.targetUserId = int.Parse(friendUserId);
         },
         OnReceived = onResponse
     };
     return(new APIRequestTask(request, requestRetry));
 }
Ejemplo n.º 3
0
    private IEnumerator GetUserNameByUserID(string UserID, Action <string> OnResult)
    {
        int    userID   = int.Parse(UserID);
        string userName = string.Empty;

        GameWebAPI.RequestUS_UserProfile request = new GameWebAPI.RequestUS_UserProfile
        {
            SetSendData = delegate(GameWebAPI.PRF_Req_ProfileData param)
            {
                param.targetUserId = userID;
            },
            OnReceived = delegate(GameWebAPI.RespDataPRF_Profile resData)
            {
                userName = resData.userData.nickname;
            }
        };
        yield return(AppCoroutine.Start(request.Run(null, null, null), false));

        OnResult(userName);
        yield break;
    }