From f9ffc1aa39d3e62a5fd09eaa9074644b257eb8e2 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Wed, 19 Aug 2020 19:37:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E5=B0=BD=E7=BB=86=E8=8A=82=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Prefabs/UI/Map/MapPanel.prefab | 28 +++++++++---------- .../~Lua/Modules/Carbon/CarbonManager.lua | 19 ++++++------- .../Formation/View/CarbonFormation.lua | 15 +++++----- .../~Lua/Modules/Map/MapManager.lua | 1 + .../~Lua/Modules/Map/MapPanel.lua | 18 ++++++++++++ .../~Lua/Modules/Map/TrialMapPanel.lua | 3 +- .../~Lua/Modules/Map/View/EndLessMapView.lua | 10 ++++++- .../~Lua/Modules/Map/View/PointHandleView.lua | 7 +++-- .../~Lua/Modules/Net/NetManager.lua | 1 + .../Popup/View/GeneralPopup_TrialSetting.lua | 2 ++ 10 files changed, 68 insertions(+), 36 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/Map/MapPanel.prefab b/Assets/ManagedResources/Prefabs/UI/Map/MapPanel.prefab index 532baac7e1..adf447c8a4 100644 --- a/Assets/ManagedResources/Prefabs/UI/Map/MapPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Map/MapPanel.prefab @@ -1156,7 +1156,7 @@ RectTransform: - {fileID: 4643422383628229334} - {fileID: 3605886898423400740} m_Father: {fileID: 224787418950452670} - m_RootOrder: 10 + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} @@ -1448,7 +1448,7 @@ RectTransform: m_Children: - {fileID: 6885256839564162491} m_Father: {fileID: 224787418950452670} - m_RootOrder: 13 + m_RootOrder: 12 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -2228,7 +2228,6 @@ RectTransform: - {fileID: 224592664444102612} - {fileID: 7737561222015288609} - {fileID: 224963046119617888} - - {fileID: 8047808549415794405} - {fileID: 224388808449838792} - {fileID: 224017108475201074} - {fileID: 7216805993157252564} @@ -2241,6 +2240,7 @@ RectTransform: - {fileID: 6221160384840256380} - {fileID: 6661436527163171077} - {fileID: 7216987480060324232} + - {fileID: 8047808549415794405} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -7286,7 +7286,7 @@ RectTransform: - {fileID: 1115112384} - {fileID: 2152693670462794979} m_Father: {fileID: 224787418950452670} - m_RootOrder: 9 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -12253,7 +12253,7 @@ RectTransform: - {fileID: 224491247109074960} - {fileID: 224018975841611412} m_Father: {fileID: 224787418950452670} - m_RootOrder: 7 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} @@ -37877,7 +37877,7 @@ RectTransform: - {fileID: 224211717906432606} - {fileID: 205422398411030658} m_Father: {fileID: 224787418950452670} - m_RootOrder: 6 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} @@ -49057,7 +49057,7 @@ RectTransform: - {fileID: 1671688726074919037} - {fileID: 3726002528657978570} m_Father: {fileID: 224787418950452670} - m_RootOrder: 17 + m_RootOrder: 16 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -70580,7 +70580,7 @@ RectTransform: - {fileID: 3262943830304729264} - {fileID: 1141173458163028699} m_Father: {fileID: 224787418950452670} - m_RootOrder: 11 + m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} @@ -86228,7 +86228,7 @@ RectTransform: - {fileID: 5148077565034289862} - {fileID: 4857466979119767916} m_Father: {fileID: 224787418950452670} - m_RootOrder: 14 + m_RootOrder: 13 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} @@ -95811,7 +95811,7 @@ RectTransform: - {fileID: 8334169591857444300} - {fileID: 3993143851427451889} m_Father: {fileID: 224787418950452670} - m_RootOrder: 15 + m_RootOrder: 14 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -96039,7 +96039,7 @@ RectTransform: - {fileID: 3802299605862912010} - {fileID: 3852267165985031638} m_Father: {fileID: 224787418950452670} - m_RootOrder: 12 + m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -96197,7 +96197,7 @@ RectTransform: m_Children: - {fileID: 8079517856685660528} m_Father: {fileID: 224787418950452670} - m_RootOrder: 5 + m_RootOrder: 17 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} @@ -97220,7 +97220,7 @@ RectTransform: m_Children: - {fileID: 7341570097136637704} m_Father: {fileID: 224787418950452670} - m_RootOrder: 16 + m_RootOrder: 15 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -117792,7 +117792,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 224787418950452670} - m_RootOrder: 8 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua index 8aabae8f26..f5fa229df3 100644 --- a/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua @@ -475,9 +475,9 @@ function this.InitQuickFightData(monsterGroupId, eventId, msg) local lastPos = data.lastPos Game.GlobalEvent:DispatchEvent(GameEvent.Map.DeadOut, 0, lastPos) -- battledHp = 0 - - FormationManager.RefreshFormation(this.root.curFormationIndex,nil, - FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos) + if MapManager.curCarbonType == CarBonTypeId.ENDLESS then + FormationManager.RefreshFormation(FormationTypeDef.FORMATION_ENDLESS_MAP,{},{}) + end else MapManager.RefreshFormationHp(data) Game.GlobalEvent:DispatchEvent(GameEvent.Map.ProgressChange, 2, 0, monsterGroupId) @@ -532,14 +532,13 @@ function this.InitQuickFightData(monsterGroupId, eventId, msg) -- 战前血量 -- 战后血量 - if MapManager.curCarbonType ~= CarBonTypeId.ENDLESS then - LogYellow("更新血量会走这里吧") - local oldHp = this.GetMapTotalBlood() - local battledHp = 0 - battledHp = this.GetMapTotalBlood() + -- if MapManager.curCarbonType ~= CarBonTypeId.ENDLESS then + -- local oldHp = this.GetMapTotalBlood() + -- local battledHp = 0 + -- battledHp = this.GetMapTotalBlood() - Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnMapTeamHpReduce, oldHp - battledHp) - end + -- Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnMapTeamHpReduce, oldHp - battledHp) + -- end end diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua b/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua index 4d11437641..a1673c1573 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua @@ -20,7 +20,6 @@ function this.Init(root, curMapId) -- else -- this.curMapId = curMapId -- end - this.InitView() end --- 获取需要显示的编队id @@ -233,12 +232,12 @@ end -- 无尽副本设置 function this.EndLessCarbon() - -- if MapManager.isInMap then - -- this.root.bg:SetActive(true) - -- this.root.btn_1:SetActive(true) - -- this.root.btn_2:SetActive(false) - -- this.root.btn_1_lab.text = Language[10726] - -- else + if MapManager.Mapping then + this.root.bg:SetActive(true) + this.root.btn_1:SetActive(true) + this.root.btn_2:SetActive(false) + this.root.btn_1_lab.text = Language[10726] + else this.root.bg:SetActive(true) this.root.btn_1:SetActive(false) this.root.btn_2:SetActive(true) @@ -246,7 +245,7 @@ function this.EndLessCarbon() this.root.btn_2_lab.text = Language[10724] -- 进入副本显示设置 MapManager.isCarbonEnter = true - -- end + end this.root.formTip:SetActive(true) this.root.formTip:GetComponent("Text").text = Language[10727] .. gameConfig[1].EndlessMinLevel .. Language[10728] diff --git a/Assets/ManagedResources/~Lua/Modules/Map/MapManager.lua b/Assets/ManagedResources/~Lua/Modules/Map/MapManager.lua index 49bd847fc1..a430c7f6fe 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/MapManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/MapManager.lua @@ -84,6 +84,7 @@ function this.InitVar() this.addHpCount=0 --回春散已使用次数 this.curCarbonType = 0--当前副本玩法类型(副本很多东西不用了,慢慢删,进图只用传 编队、玩法 之后服务器返回mapId) + this.Mapping = false end function this.InitData(msg) diff --git a/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua b/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua index d7ead081b0..63e4397619 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua @@ -32,6 +32,14 @@ function this:InitComponent() this.xingYaoNum=Util.GetGameObject(this.btnXingYao,"num"):GetComponent("Text") this.btnReward=Util.GetGameObject(self.gameObject,"leftCenter/btnReward") + this.btnXingYao=Util.GetGameObject(self.gameObject,"rightDown/btnXingYao") + this.btnBomb=Util.GetGameObject(self.gameObject,"rightDown/btnBomb") + this.btnBuff=Util.GetGameObject(self.gameObject,"rightDown/buff") + this.btnShop=Util.GetGameObject(self.gameObject,"rightDown/shop") + this.btnReset=Util.GetGameObject(self.gameObject,"rightDown/btnReset") + this.btnFormat=Util.GetGameObject(self.gameObject,"rightDown/btnFormat") + this.btnNode=Util.GetGameObject(self.gameObject,"rightDown/btnNote") + this.item = Util.GetGameObject(self.gameObject, "item") @@ -183,6 +191,14 @@ function this:OnShow() trialPanel:OnShow() this.endLessTitle:SetActive(MapManager.curCarbonType == CarBonTypeId.ENDLESS) Util.GetGameObject(self.gameObject,"leftCenter"):SetActive(MapManager.curCarbonType ~= CarBonTypeId.ENDLESS) + + this.btnXingYao:SetActive(MapManager.curCarbonType == CarBonTypeId.TRIAL) + this.btnBomb:SetActive(MapManager.curCarbonType == CarBonTypeId.TRIAL) + this.btnBuff:SetActive(MapManager.curCarbonType == CarBonTypeId.TRIAL) + this.btnShop:SetActive(MapManager.curCarbonType == CarBonTypeId.TRIAL) + this.btnReset:SetActive(MapManager.curCarbonType == CarBonTypeId.ENDLESS) + this.btnFormat:SetActive(MapManager.curCarbonType == CarBonTypeId.ENDLESS) + this.btnNode:SetActive(false) end --界面打开时调用(用于子类重写) @@ -477,8 +493,10 @@ function this.OnMapOut(outType) -- NetManager.MapOutRequest(outType, function (msg) if outType == 0 then this.BackHome() + MapManager.Mapping = false elseif outType == 1 then -- 正常出图 this.BackToCarbonPanel() + MapManager.Mapping = false else --换层或者换地图 this.ChangeMapByType() end diff --git a/Assets/ManagedResources/~Lua/Modules/Map/TrialMapPanel.lua b/Assets/ManagedResources/~Lua/Modules/Map/TrialMapPanel.lua index c7ecf4eea3..507eef499f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/TrialMapPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/TrialMapPanel.lua @@ -154,6 +154,7 @@ function TrialMapPanel:OnOpen() end function TrialMapPanel:OnShow() + end function this.InitShowState() @@ -468,7 +469,7 @@ end function this.SetSelectHero(isFirstIn,isFirstData,isMainIn) local itemId=trialSetting[1].HealingId[1] local itemNum=trialSetting[1].HealingId[2] - this.selectHero:SetActive(true) + this.selectHero:SetActive((true) and (MapManager.curCarbonType == CarBonTypeId.TRIAL)) local d={} if isFirstIn then--若是第一次进 此时我必有该英雄 不用担心是已删除英雄 通过HeroDid去获取数据 for n, did in ipairs(isFirstData) do diff --git a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua index f235debe0b..0d3f4d9e0a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua @@ -57,6 +57,10 @@ function this.InitComponent(gameObject, mapPanel) -- 购买行动力的货币 this.moneyNum = Util.GetGameObject(gameObject, "endLessTitle/frame/num") this.moneyIcon = Util.GetGameObject(gameObject, "endLessTitle/frame/icon") + + this.helpBtn=Util.GetGameObject(gameObject,"helpBtn") + this.helpPos=this.helpBtn:GetComponent("RectTransform").localPosition + this.helpBtn:SetActive(false) end function this.OnSortingOrderChange() @@ -64,6 +68,10 @@ function this.OnSortingOrderChange() end function this.BindEvent() + --帮助按钮 + Util.AddClick(this.helpBtn,function() + UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.Sunro,this.helpPos.x,this.helpPos.y) + end) -- 重置 Util.AddClick(this.btnReset, function () if not this.CanClick() then return end @@ -190,7 +198,7 @@ function this.InitCompShow(carbonType) this.areaName.gameObject:SetActive(carbonType == CARBON_TYPE.ENDLESS) this.btnReset:SetActive(carbonType == CARBON_TYPE.ENDLESS) this.btnFormat:SetActive(carbonType == CARBON_TYPE.ENDLESS) - this.btnNote:SetActive(carbonType == CARBON_TYPE.ENDLESS) + this.btnNote:SetActive(false) -- this.warnRoot:SetActive(carbonType == CARBON_TYPE.ENDLESS) -- this.warn:SetActive(false) this.btnSet:SetActive(carbonType == CARBON_TYPE.ENDLESS) diff --git a/Assets/ManagedResources/~Lua/Modules/Map/View/PointHandleView.lua b/Assets/ManagedResources/~Lua/Modules/Map/View/PointHandleView.lua index 833071d464..ebb8bfe5ed 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/View/PointHandleView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/View/PointHandleView.lua @@ -59,8 +59,11 @@ function this.GeneratePoint() -- end -- end - -- 设置一下战力的显示 - this.RefreshAtkShow() + if MapManager.curCarbonType == CarBonTypeId.ENDLESS then + -- 设置一下战力的显示 + this.RefreshAtkShow() + end + end function this.OnShow() diff --git a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua index abc59db033..4829f2d1b6 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua @@ -357,6 +357,7 @@ function this.MapInfoRequest(mapModeId,func) end -- 请求进图后 MapManager.isInMap = true + MapManager.Mapping = true end) end diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_TrialSetting.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_TrialSetting.lua index 9cb101a824..ac57f61479 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_TrialSetting.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_TrialSetting.lua @@ -55,6 +55,8 @@ function this:OnShow(_parent,...) go:SetActive(false) end end + btns[2]:SetActive(MapManager.curCarbonType == CarBonTypeId.TRIAL) + btns[3]:SetActive(MapManager.curCarbonType == CarBonTypeId.TRIAL) end function this:OnClose()