当前位置: 首页>>代码示例>>C#>>正文


C# BaseWWWRequest类代码示例

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


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


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