From 233ff1b361373d2e7790b6ac9fdbead14bc3677d Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Tue, 17 Nov 2020 17:12:52 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=BC=96=E9=98=9F=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E6=97=A0=E5=B0=BD=E5=89=AF=E6=9C=AC=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Formation/View/CarbonFormation.lua | 268 +++++++++--------- 1 file changed, 132 insertions(+), 136 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua b/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua index 74738e4a19..42aebfd41e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua @@ -15,17 +15,13 @@ this.IsNeedChangeFormation = true --- 逻辑初始化 function this.Init(root, curMapId) this.root = root - -- if CarbonManager.difficulty == CARBON_TYPE.ENDLESS then - this.curMapId = EndLessMapManager.openMapId - -- else - -- this.curMapId = curMapId - -- end + this.curMapId = EndLessMapManager.openMapId this.InitView() end --- 获取需要显示的编队id function this.GetFormationIndex() local index = 0 - if CarbonManager.difficulty == 4 then + if CarbonManager.difficulty == CARBON_TYPE.ENDLESS then index = FormationTypeDef.FORMATION_ENDLESS_MAP else FormationManager.curFormationIndex = FormationTypeDef.FORMATION_NORMAL @@ -37,131 +33,131 @@ end -- 扫荡按钮 --- btn1点击回调事件 function this.On_Btn1_Click() - if CarbonManager.difficulty == 4 and MapManager.Mapping then - if this.root.order>=1 then - --保存编队 - FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList, - FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos) - PopupTipPanel.ShowTip(Language[10713]) - else - PopupTipPanel.ShowTip(Language[10714]) - end - return - end - -- 刷新扫荡数据 - this.root.ShowStartMopUpInfoData() - -- 显示扫荡界面 - this.root.mopUpGo:SetActive(true) - PlayUIAnim( this.root.mopUpGo) + this.root.SetOneKeyGo() + --以前的换成的一键上阵 + + -- if CarbonManager.difficulty == CARBON_TYPE.ENDLESS and MapManager.Mapping then + -- if this.root.order>=1 then + -- --保存编队 + -- FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList, + -- FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos) + -- PopupTipPanel.ShowTip(Language[10713]) + -- else + -- PopupTipPanel.ShowTip(Language[10714]) + -- end + -- return + -- end + -- 刷新扫荡数据--应该是没了 + -- this.root.ShowStartMopUpInfoData() + -- -- 显示扫荡界面 + -- this.root.mopUpGo:SetActive(true) + -- PlayUIAnim( this.root.mopUpGo) end --- btn2点击回调事 -local itemType = { - [1] = 27, - [3] = 28, -} +-- local itemType = { +-- [1] = 27, +-- [3] = 28, +-- } -- 进入地图 function this.On_Btn2_Click() + --保存编队 if this.root.order>=1 then - --保存编队 FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList, FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos) + this.root:ClosePanel() else - PopupTipPanel.ShowTip(string.format(Language[10701], 1)) + PopupTipPanel.ShowTip(Language[10714]) return end - -- 判断当前选择的副本类型 - local itemId = itemType[CarbonManager.difficulty] - -- 无尽副本 if CarbonManager.difficulty == CARBON_TYPE.ENDLESS then - if #FormationManager.GetFormationByID(401).teamHeroInfos == 0 then - PopupTipPanel.ShowTip(Language[10714]) - return - end - else - if #FormationManager.formationList[FormationManager.curFormationIndex].teamHeroInfos == 0 then - Log(Language[10715]) - PopupTipPanel.ShowTip(Language[10714]) - return + if MapManager.Mapping then--在地图里 + if this.root.order>=1 then + FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList, + FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos) + PopupTipPanel.ShowTip(Language[10713]) + else + PopupTipPanel.ShowTip(Language[10714]) + end + else + Log("进入的副本difficulty:"..CarbonManager.difficulty) + this.EnterMapbyType(CarbonManager.difficulty)--, itemId) end end +--+======================================= + + + -- if this.root.order>=1 then + -- --保存编队 + -- FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList, + -- FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos) + -- else + -- PopupTipPanel.ShowTip(string.format(Language[10701], 1)) + -- return + -- end + -- -- 判断当前选择的副本类型 + -- local itemId = itemType[CarbonManager.difficulty] + + -- 无尽副本 + -- if CarbonManager.difficulty == CARBON_TYPE.ENDLESS then + -- if #FormationManager.GetFormationByID(401).teamHeroInfos == 0 then + -- PopupTipPanel.ShowTip(Language[10714]) + -- return + -- end + -- else + -- if #FormationManager.formationList[FormationManager.curFormationIndex].teamHeroInfos == 0 then + -- Log(Language[10715]) + -- PopupTipPanel.ShowTip(Language[10714]) + -- return + -- end + -- end + -- 判断挑战次数 - if CarbonManager.difficulty == 1 then -- 普通副本 - if BagManager.GetItemCountById(itemId) <= 0 and CarbonManager.GetNormalState(this.curMapId)then - PopupTipPanel.ShowTip(Language[10716]) - return - end - elseif CarbonManager.difficulty == 3 then -- 英雄副本 - if BagManager.GetItemCountById(itemId) <= 0 then - PopupTipPanel.ShowTip(Language[10717]) - UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.EliteCarbonTicket }) - return - end - -- elseif CarbonManager.difficulty == 2 then -- 失恋副本 - -- Log("即将进入试炼副本!") - end - if CarbonManager.difficulty == 1 or CarbonManager.difficulty == 3 then - -- 战斗力判断 - if this.root.formationPower