diff --git a/Assets/ManagedResources/~Lua/Logic/GameEvent.lua b/Assets/ManagedResources/~Lua/Logic/GameEvent.lua index 638746d1ff..e7e294b55d 100644 --- a/Assets/ManagedResources/~Lua/Logic/GameEvent.lua +++ b/Assets/ManagedResources/~Lua/Logic/GameEvent.lua @@ -362,6 +362,7 @@ GameEvent = { OnGuessDataUpdate = "TopMatch.OnGuessDataUpdate", OnGuessRateUpdate = "TopMatch.OnGuessRateUpdate", OnGuessDataUpdateShowTip = "TopMatch.OnGuessDataUpdateShowTip", + CommonInfoRefreshTitle = "TopMatch.CommonInfoRefreshTitle", }, FindFairy={ RefreshRedPoint="FindFairy.RefreshRedPoint", diff --git a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchManager.lua b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchManager.lua index a7d1473afd..cec9660cc2 100644 --- a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchManager.lua @@ -3,6 +3,7 @@ local this = ArenaTopMatchManager this.CurTabIndex = 0 this.curIsShowDoGuessPopup = false local isChange = false +this.panelType = 1 local stageNameTable = { [1] = 32 .. Language[10097],--强 [2] = 16 .. Language[10097],--强 diff --git a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchPanel.lua b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchPanel.lua index 91ddbe6225..fd35f9ac29 100644 --- a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchPanel.lua @@ -162,10 +162,10 @@ end -- function this.OpenView(index) + ArenaTopMatchManager.panelType = index this._CurLogicIndex = index ArenaTopMatchManager.SetCurTabIndex(index) this._CurTabIndex = index - local logic = this.ViewLogicList[index] if not logic then this.ViewLogicList[index] = reimport(_ViewData[index].script) diff --git a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_CommonInfo.lua b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_CommonInfo.lua index a0921565dd..11eea18523 100644 --- a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_CommonInfo.lua +++ b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_CommonInfo.lua @@ -134,6 +134,7 @@ function this.SetInfoData(panelType, blueData, redData, textType, showScore,batt elseif this.panelType == 2 then this.awaitText.transform.localPosition = Vector3.New(0,515,0) end + Game.GlobalEvent:DispatchEvent(GameEvent.TopMatch.CommonInfoRefreshTitle) end -- 设置显隐 @@ -196,9 +197,13 @@ function this.RefreshData(showScore, textType) this.myScore.gameObject:SetActive(false) end -- this.textImg.sprite = Util.LoadSprite(imgRes[textType].resPath) - this.textImg.sprite = Util.LoadSprite(imgRes[textType].resPath) - this.textImg.gameObject.transform.localPosition = imgRes[textType].pos - this.textImg.gameObject.transform.sizeDelta = imgRes[textType].size + local imageTextType = textType + if ArenaTopMatchManager.GetIsBattleEndState(this.panelType) then + imageTextType = 1 + end + this.textImg.sprite = Util.LoadSprite(imgRes[imageTextType].resPath) + this.textImg.gameObject.transform.localPosition = imgRes[imageTextType].pos + this.textImg.gameObject.transform.sizeDelta = imgRes[imageTextType].size -- this.textImg:SetNativeSize() -- 设置编队按钮状态 diff --git a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_Title.lua b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_Title.lua index 3417d8c6b7..c48171a4f1 100644 --- a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_Title.lua +++ b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_Title.lua @@ -8,6 +8,8 @@ function ATM_Title:InitComponent(root) this.matchName = Util.GetGameObject(this.stagePanel, "name"):GetComponent("Text") this.freshTime = Util.GetGameObject(this.stagePanel, "time"):GetComponent("Text") this.timeType = Util.GetGameObject(this.stagePanel, "timelab"):GetComponent("Text") + this.freshTimeGo = Util.GetGameObject(this.stagePanel, "time") + this.timeTypeGO = Util.GetGameObject(this.stagePanel, "timelab") this.integralPanel = Util.GetGameObject(root.transform, "ImgIntegral") this.score = Util.GetGameObject(this.integralPanel, "integral"):GetComponent("Text") @@ -37,11 +39,13 @@ end --添加事件监听(用于子类重写) function ATM_Title:AddListener() Game.GlobalEvent:AddEvent(GameEvent.TopMatch.OnTopMatchDataUpdate, this.RefreshBaseShow) + Game.GlobalEvent:AddEvent(GameEvent.TopMatch.CommonInfoRefreshTitle, this.RefreshBaseShow) end --移除事件监听(用于子类重写) function ATM_Title:RemoveListener() Game.GlobalEvent:RemoveEvent(GameEvent.TopMatch.OnTopMatchDataUpdate, this.RefreshBaseShow) + Game.GlobalEvent:RemoveEvent(GameEvent.TopMatch.CommonInfoRefreshTitle, this.RefreshBaseShow) end @@ -90,7 +94,12 @@ function this.RefreshBaseShow() local tmData = ArenaTopMatchManager.GetBaseData() local isJoin = tmData.joinState == 1 local titleName, stageName, stateName = ArenaTopMatchManager.GetCurTopMatchName() - + this.freshTimeGo:SetActive(true) + this.timeTypeGO:SetActive(true) + if ArenaTopMatchManager.panelType <= 2 then + this.freshTimeGo:SetActive(not ArenaTopMatchManager.GetIsBattleEndState(ArenaTopMatchManager.panelType)) + this.timeTypeGO:SetActive(not ArenaTopMatchManager.GetIsBattleEndState(ArenaTopMatchManager.panelType)) + end if not isOpen then if tmData.progress == -2 then this.matchName.text = " "..titleName