• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# BaseWWWRequest类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中BaseWWWRequest的典型用法代码示例。如果您正苦于以下问题:C# BaseWWWRequest类的具体用法?C# BaseWWWRequest怎么用?C# BaseWWWRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BaseWWWRequest类属于命名空间,在下文中一共展示了BaseWWWRequest类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: onReqSkillSuccess

 private void onReqSkillSuccess(BaseWWWRequest obj)
 {
     try
     {
         if (this.needZip)
         {
             this.skillResponse = JsonReader.Deserialize<SkillShipData>(base.UTF8String);
         }
         else
         {
             this.skillResponse = JsonReader.Deserialize<SkillShipData>(base.www.text);
         }
         base.responseData = this.skillResponse;
         if (this.skillResponse.eid != 0)
         {
             this.onReqSkillFail(obj);
         }
         else
         {
             if (this.skillResponse.shipVO != null)
             {
                 GameData.instance.UpdateUserShip(this.skillResponse.shipVO);
             }
             this.OnSkillSuccess(EventArgs.Empty);
         }
     }
     catch (Exception exception)
     {
         Debug.Log(exception);
         base.parseException = exception;
         this.onReqSkillFail(obj);
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:33,代码来源:ReqSkill.cs


示例2: onInitShipSuccess

 private void onInitShipSuccess(BaseWWWRequest obj)
 {
     try
     {
         if (this.needZip)
         {
             this.initResponse = JsonReader.Deserialize<BasicResponse>(base.UTF8String);
         }
         else
         {
             this.initResponse = JsonReader.Deserialize<BasicResponse>(base.www.text);
         }
         if (this.initResponse.eid != 0)
         {
             this.onInitFail(obj);
         }
         else
         {
             ServerRequestManager.instance.OnChooseInitShipSuccess();
             Debug.Log("onInitShipSuccess Success: " + base.www.text);
         }
     }
     catch (Exception)
     {
         this.onInitFail(obj);
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:27,代码来源:ReqLogin.cs


示例3: onSuccess

 private void onSuccess(BaseWWWRequest obj)
 {
     try
     {
         if (this.needZip)
         {
             this.loginVO = JsonReader.Deserialize<LoginVO>(base.UTF8String);
         }
         else
         {
             this.loginVO = JsonReader.Deserialize<LoginVO>(base.www.text);
         }
         if (this.loginVO.eid != 0)
         {
             this.onFail(obj);
         }
         else
         {
             GameData.instance.LoginInfo = this.loginVO;
             ServerRequestManager.instance.OnLoginSuccess();
         }
     }
     catch (Exception)
     {
         this.onFail(obj);
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:27,代码来源:ReqLogin.cs


示例4: onReqChangeSuccess

 private void onReqChangeSuccess(BaseWWWRequest obj)
 {
     try
     {
         ChangeEquipData data = new JsonFx.Json.JsonReader().Read<ChangeEquipData>(this.UTF8String);
         base.responseData = data;
         if (data.eid != 0)
         {
             this.onReqChangeFail(obj);
         }
         else
         {
             if (data.shipVO != null)
             {
                 GameData.instance.UpdateUserShip(data.shipVO);
             }
             if (data.detailInfo != null)
             {
                 GameData.instance.UserInfo.UpdateDetailInfo(data.detailInfo);
             }
             this.UpdateEquip();
             this.OnChangeEquipSuccess(EventArgs.Empty);
         }
     }
     catch (Exception exception)
     {
         z.log(exception.Message);
         this.onReqChangeFail(obj);
     }
 }
开发者ID:lavender1213,项目名称:ShipGirlBot,代码行数:30,代码来源:ReqEquipment.cs


示例5: onReqChangeSuccess

 private void onReqChangeSuccess(BaseWWWRequest obj)
 {
     try
     {
         DestroyShipData data = new JsonFx.Json.JsonReader().Read<DestroyShipData>(this.UTF8String);
         base.responseData = data;
         if (data.eid != 0)
         {
             this.onReqChangeFail(obj);
         }
         else
         {
             if (data.userVo != null)
             {
                 GameData.instance.UserInfo.UpdateResource(data.userVo);
             }
             if (data.equipmentVo != null)
             {
                 GameData.instance.SetUserEquipments(data.equipmentVo);
             }
             if (data.detailInfo != null)
             {
                 GameData.instance.UserInfo.UpdateDetailInfo(data.detailInfo);
             }
             this.UpdateShips();
             this.OnDestroySuccess(EventArgs.Empty);
         }
     }
     catch (Exception exception)
     {
         z.log(exception.Message);
         this.onReqChangeFail(obj);
     }
 }
开发者ID:lavender1213,项目名称:ShipGirlBot,代码行数:34,代码来源:ReqDestroyShip.cs


示例6: onReqSkillSuccess

 private void onReqSkillSuccess(BaseWWWRequest obj)
 {
     try
     {
         this.skillResponse = new JsonReader().Read<SkillShipData>(base.UTF8String);
         base.responseData = this.skillResponse;
         if (this.skillResponse.eid != 0)
         {
             this.onReqSkillFail(obj);
         }
         else
         {
             if (this.skillResponse.shipVO != null)
             {
                 GameData.instance.UpdateUserShip(this.skillResponse.shipVO);
             }
             this.OnSkillSuccess(EventArgs.Empty);
         }
     }
     catch (Exception exception)
     {
         z.log(exception.Message);
         this.onReqSkillFail(obj);
     }
 }
开发者ID:lavender1213,项目名称:ShipGirlBot,代码行数:25,代码来源:ReqSkill.cs


示例7: onReqToggleLockSuccess

 private void onReqToggleLockSuccess(BaseWWWRequest obj)
 {
     try
     {
         ToggleUserShipLockResponse response;
         if (this.needZip)
         {
             response = JsonReader.Deserialize<ToggleUserShipLockResponse>(base.UTF8String);
         }
         else
         {
             response = JsonReader.Deserialize<ToggleUserShipLockResponse>(base.www.text);
         }
         base.responseData = response;
         if (response.eid != 0)
         {
             this.onReqToggleLockFail(obj);
         }
         else
         {
             this.requestingShip.isLocked = response.isLocked;
             this.OnToggleLockSuccess(EventArgs.Empty);
         }
     }
     catch (Exception exception)
     {
         Debug.Log(exception);
         base.parseException = exception;
         this.onReqToggleLockFail(obj);
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:31,代码来源:FleetShipChangeRequest.cs


示例8: onReqGetListSuccess

 private void onReqGetListSuccess(BaseWWWRequest obj)
 {
     try
     {
         LeaderBoardListData data;
         if (this.needZip)
         {
             data = JsonReader.Deserialize<LeaderBoardListData>(base.UTF8String);
         }
         else
         {
             data = JsonReader.Deserialize<LeaderBoardListData>(base.www.text);
         }
         base.responseData = data;
         if (data.eid != 0)
         {
             this.onReqGetListFail(obj);
         }
         else
         {
             GameData.instance.SetLeaderBoardData(data);
             this.OnGetListSuccess(EventArgs.Empty);
         }
     }
     catch (Exception exception)
     {
         Debug.Log(exception);
         base.parseException = exception;
         this.onReqGetListFail(obj);
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:31,代码来源:ReqLeaderBoard.cs


示例9: onReqStrenSuccess

 private void onReqStrenSuccess(BaseWWWRequest obj)
 {
     try
     {
         StrengthenData data = new JsonReader().Read<StrengthenData>(base.UTF8String);
         base.responseData = data;
         if (data.eid != 0)
         {
             this.onReqStrenFail(obj);
         }
         else
         {
             if (data.shipVO != null)
             {
                 GameData.instance.UpdateUserShip(data.shipVO);
             }
             this.DeleteMaterials();
             if (data.detailInfo != null)
             {
                 GameData.instance.UserInfo.UpdateDetailInfo(data.detailInfo);
             }
             if (data.equipmentVo != null)
             {
                 GameData.instance.SetUserEquipments(data.equipmentVo);
             }
             this.OnStrengthenSuccess(EventArgs.Empty);
         }
     }
     catch (Exception exception)
     {
         z.log(exception.Message);
         this.onReqStrenFail(obj);
     }
 }
开发者ID:lavender1213,项目名称:ShipGirlBot,代码行数:34,代码来源:ReqStrengthen.cs


示例10: onReqChangeSuccess

 private void onReqChangeSuccess(BaseWWWRequest obj)
 {
     try
     {
         GetCardResponse response;
         if (this.needZip)
         {
             response = JsonReader.Deserialize<GetCardResponse>(base.UTF8String);
         }
         else
         {
             response = JsonReader.Deserialize<GetCardResponse>(base.www.text);
         }
         base.responseData = response;
         if (response.eid != 0)
         {
             this.onReqChangeFail(obj);
         }
         else
         {
             GameData.instance.SetUnlockedCards(response.unlockShip);
             this.OnGetCardsSuccess(EventArgs.Empty);
         }
     }
     catch (Exception exception)
     {
         Debug.Log(exception);
         base.parseException = exception;
         this.onReqChangeFail(obj);
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:31,代码来源:ReqUnlockedCard.cs


示例11: onInitFail

 private void onInitFail(BaseWWWRequest obj)
 {
     if (this.initResponse != null)
     {
         ServerRequestManager.instance.OnChooseInitShipFail(this.initResponse.eid);
     }
     else
     {
         ServerRequestManager.instance.OnChooseInitShipFail(0);
     }
     Debug.Log("Login Fail: " + base.www.error + "\n " + base.www.text);
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:12,代码来源:ReqLogin.cs


示例12: onFail

 private void onFail(BaseWWWRequest obj)
 {
     if (this.loginVO != null)
     {
         ServerRequestManager.instance.OnLoginFail(this.loginVO.eid);
     }
     else
     {
         ServerRequestManager.instance.OnLoginFail(0);
     }
     Debug.Log("Login Fail: " + base.www.error + "\n " + base.www.text);
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:12,代码来源:ReqLogin.cs


示例13: onFail

 private void onFail(BaseWWWRequest obj)
 {
     if (this.loginVO != null)
     {
         ServerRequestManager.instance.OnLoginFail(this.loginVO.eid);
     }
     else
     {
         ServerRequestManager.instance.OnLoginFail(0);
     }
     z.log("[登陆失败] " + base.www.error + "\r\n " + this.UTF8String);
 }
开发者ID:lavender1213,项目名称:ShipGirlBot,代码行数:12,代码来源:ReqLogin.cs


示例14: onSuccess

    private void onSuccess(BaseWWWRequest obj)
    {
        try
        {
            AllConfigs configs;
            if (this.needZip)
            {
                configs = new JsonFx.Json.JsonReader().Read<AllConfigs>(base.UTF8String);
            }
            else
            {
                configs = new JsonFx.Json.JsonReader().Read<AllConfigs>(this.UTF8String);
            }
            if (configs.eid != 0)
            {
                this.onFail(obj);
            }
            else
            {
                z.log("setShips");
                AllShipConfigs.instance.setShips(configs.shipCard);
                z.log("shipCard");
                GameConfigs.instance.PrepareEquipmentConfigs(configs.shipEquipment);
                z.log("PrepareEquipmentConfigs");
                GameConfigs.instance.PreparePVEExploreLevels(configs.pveExplore);
                z.log("PreparePVEExploreLevels");
                GameConfigs.instance.SetShopItems(configs.shipShop);
                GameConfigs.instance.SetShipEvoItems(configs.shipItem);
                GameConfigs.instance.SetSkillConfigs(configs.shipSkill);
                z.log("SetSkillConfigs");
                GameConfigs.instance.SetBuffConfigs(configs.shipSkillBuff);
                GameConfigs.instance.GlobalConfig = configs.globalConfig;
                GameConfigs.instance.marketingConfigs = configs.marketingConfigs;
                z.log("marketingConfigs");
                PVEConfigs.instance.SetCampaignChapters(configs.shipCampaign);
                PVEConfigs.instance.SetCampaignLevels(configs.shipCampaignLevel);
                GameConfigs.instance.errCode = configs.errorCode;

                //if (this.testShipUpdate && (this.shipUpdateconfigs != null))
                //{
                //    UpdateConfigs configs2 = JsonReader.Deserialize<UpdateConfigs>(this.shipUpdateconfigs.text);
                //    UpdateManager.Instance.SetShips(configs2.ships);
                //}

                ServerRequestManager.instance.OnLoadConfigsComplete();
            }
        }
        catch (Exception e)
        {
            z.log(e.Message+ "  " + e.StackTrace);
            this.onFail(obj);
        }
    }
开发者ID:lavender1213,项目名称:ShipGirlBot,代码行数:53,代码来源:LoadConfigs.cs


示例15: onReqModifySuccess

 private void onReqModifySuccess(BaseWWWRequest obj)
 {
     try
     {
         if (this.needZip)
         {
             this.modifyResponse = JsonReader.Deserialize<ModifyShipData>(base.UTF8String);
         }
         else
         {
             this.modifyResponse = JsonReader.Deserialize<ModifyShipData>(base.www.text);
         }
         base.responseData = this.modifyResponse;
         if (this.modifyResponse.eid != 0)
         {
             this.onReqModifyFail(obj);
         }
         else
         {
             this.UpdateShips();
             if (this.modifyResponse.userResVo != null)
             {
                 GameData.instance.UserInfo.UpdateResource(this.modifyResponse.userResVo);
             }
             if (this.modifyResponse.shipVO != null)
             {
                 foreach (UserShip ship in this.modifyResponse.shipVO)
                 {
                     GameData.instance.AddUserShip(ship);
                 }
             }
             if (this.modifyResponse.equipmentVo != null)
             {
                 foreach (UserEquipment equipment in this.modifyResponse.equipmentVo)
                 {
                     GameData.instance.AddUserEquipmenet(equipment);
                 }
             }
             if (this.modifyResponse.packageVo != null)
             {
                 GameData.instance.UpdateUserItems(this.modifyResponse.packageVo);
             }
             this.OnModifySuccess(EventArgs.Empty);
         }
     }
     catch (Exception exception)
     {
         Debug.Log(exception);
         base.parseException = exception;
         this.onReqModifyFail(obj);
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:52,代码来源:ReqModify.cs


示例16: onFail

 private void onFail(BaseWWWRequest obj)
 {
     if (this.initData != null)
     {
         ServerRequestManager.instance.OnLoginFail(this.initData.eid);
     }
     else
     {
         ServerRequestManager.instance.OnLoginFail(0);
     }
     base.ShowServerError();
     Debug.Log("GetInitData Fail: " + base.www.error + "\n" + base.www.text);
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:13,代码来源:GetInitData.cs


示例17: onFail

 private void onFail(BaseWWWRequest obj)
 {
     if (this.initData != null)
     {
         ServerRequestManager.instance.OnLoginFail(this.initData.eid);
     }
     else
     {
         ServerRequestManager.instance.OnLoginFail(0);
     }
     base.ShowServerError();
     z.log("[获取初始配置失败]: " + base.www.error + "\r\n" + this.UTF8String);
 }
开发者ID:GreenDamTan,项目名称:ShipGirlBot,代码行数:13,代码来源:GetInitData.cs


示例18: onSuccess

    private void onSuccess(BaseWWWRequest obj)
    {
        try
        {
            if (this.needZip)
            {
                this.initData = new JsonFx.Json.JsonReader().Read<InitDataVO>(base.UTF8String);
            }
            else
            {
                this.initData = new JsonFx.Json.JsonReader().Read<InitDataVO>(this.UTF8String);
            }
            if (this.initData.eid != 0)
            {
                this.onFail(obj);
            }
            else
            {
                GameData instance = GameData.instance;
                ServerTimer.SetSystemInitTime(this.initData.systime);
                instance.UserInfo = this.initData.userVo;
                instance.UserFleets = this.initData.fleetVo;
                instance.SetUserShips(this.initData.userShipVO);
                instance.SetUserEquipments(this.initData.equipmentVo);
                instance.UserDocks = this.initData.dockVo;
                instance.UserEquipDocks = this.initData.equipmentDockVo;
                instance.UpdateUserItems(this.initData.packageVo);
                instance.SetRepairDocks(this.initData.repairDockVo);
                instance.UpdatePVEExplore(this.initData.pveExploreVo);
                instance.AddUserQuests(this.initData.taskVo);
                instance.SetUnlockedCards(this.initData.unlockShip);
                instance.MarketingDatas = this.initData.marketingData;
                instance.SetLastUpdateQuestTime();
                instance.NewMailNum = this.initData.newMailNum;
                if (this.initData.currentPveVo != null)
                {
                    instance.SetCurrentNodeStatus(this.initData.currentPveVo);
                }

                ServerRequestManager.instance.OnGetInitDataSuccess();
                z.log("[登陆成功] 获取基本信息成功");
            }
        }
        catch (Exception exception)
        {
            z.log(exception.Message);
            this.onFail(obj);
        }
    }
开发者ID:GreenDamTan,项目名称:ShipGirlBot,代码行数:49,代码来源:GetInitData.cs


示例19: onSuccess

 private void onSuccess(BaseWWWRequest obj)
 {
     try
     {
         RegisterVO rvo = JsonReader.Deserialize<RegisterVO>(base.www.text);
         if ((rvo.eid <= 0) && (rvo.userId > 0))
         {
             Debug.Log(string.Concat(new object[] { "Instant Register machine ", this.machineId, " success!! return userId ", rvo.userId }));
         }
     }
     catch (Exception exception)
     {
         base.parseException = exception;
         this.onFail(obj);
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:16,代码来源:ReqRegister.cs


示例20: onSuccess

 private void onSuccess(BaseWWWRequest obj)
 {
     try
     {
         if (this.needZip)
         {
             this.initData = JsonReader.Deserialize<InitDataVO>(base.UTF8String);
         }
         else
         {
             this.initData = JsonReader.Deserialize<InitDataVO>(base.www.text);
         }
         if (this.initData.eid != 0)
         {
             this.onFail(obj);
         }
         else
         {
             GameData instance = GameData.instance;
             ServerTimer.SetSystemInitTime(this.initData.systime);
             instance.UserInfo = this.initData.userVo;
             instance.UserFleets = this.initData.fleetVo;
             instance.SetUserShips(this.initData.userShipVO);
             instance.SetUserEquipments(this.initData.equipmentVo);
             instance.UserDocks = this.initData.dockVo;
             instance.UserEquipDocks = this.initData.equipmentDockVo;
             instance.UpdateUserItems(this.initData.packageVo);
             instance.SetRepairDocks(this.initData.repairDockVo);
             instance.UpdatePVEExplore(this.initData.pveExploreVo);
             instance.AddUserQuests(this.initData.taskVo);
             instance.SetUnlockedCards(this.initData.unlockShip);
             instance.MarketingDatas = this.initData.marketingData;
             instance.SetLastUpdateQuestTime();
             instance.NewMailNum = this.initData.newMailNum;
             ServerRequestManager.instance.OnGetInitDataSuccess();
             Debug.Log("OnGetInitDataSuccess");
         }
     }
     catch (Exception exception)
     {
         Debug.Log(exception);
         base.parseException = exception;
         this.onFail(obj);
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:45,代码来源:GetInitData.cs



注:本文中的BaseWWWRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# BaseWidget类代码示例发布时间:2022-05-24
下一篇:
C# BaseTypeDeclarationSyntax类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap