【ID1019147】

【寻宝】神魂等级效果在寻宝详情界面穿透

(cherry picked from commit 3921d6326f)
dev_chengFeng
jiaoyangna 2021-11-16 16:59:30 +08:00
parent 6e2deee6f1
commit e3db539691
3 changed files with 11 additions and 3 deletions

View File

@ -378,6 +378,7 @@ GameEvent = {
FindTreasure={
RefreshFindTreasure="FindTreasure.RefreshFindTreasure",
RefreshFindTreasureRedPot="FindTreasure.RefreshFindTreasureRedPot",
RefreshFindTreasureRect="FindTreasure.RefreshFindTreasureRect",
},
TopMatch={
OnTopMatchDataUpdate = "TopMatch.OnTopMatchDataUpdate",

View File

@ -522,7 +522,7 @@ function FindTreasureDispatchPanel:TimeStampToDateString(second)
end
--界面关闭时调用(用于子类重写)
function FindTreasureDispatchPanel:OnClose()
Game.GlobalEvent:DispatchEvent(GameEvent.FindTreasure.RefreshFindTreasureRect)
if timer then
timer:Stop()
timer = nil

View File

@ -32,6 +32,7 @@ function FindTreasureMainPanel:InitComponent()
-- end
-- findTreasureItemsGrid[i] = curexpertRewardItemsGri
-- end
self.rectRoot = Util.GetGameObject(self.gameObject, "rect")
local v = Util.GetGameObject(self.gameObject, "rect/rect (1)"):GetComponent("RectTransform").rect
self.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, Util.GetGameObject(self.gameObject, "rect/rect (1)").transform,
self.rewardPre, nil, Vector2.New(v.width, v.height), 1, 1, Vector2.New(0,-5))
@ -167,16 +168,20 @@ end
--添加事件监听(用于子类重写)
function FindTreasureMainPanel:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.FindTreasure.RefreshFindTreasureRect, self.RefreshFindTreasureRect,self)
Game.GlobalEvent:AddEvent(GameEvent.FindTreasure.RefreshFindTreasure, self.OnShowPanelData,self)
end
--移除事件监听(用于子类重写)
function FindTreasureMainPanel:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.FindTreasure.RefreshFindTreasureRect, self.RefreshFindTreasureRect,self)
Game.GlobalEvent:RemoveEvent(GameEvent.FindTreasure.RefreshFindTreasure, self.OnShowPanelData,self)
end
function FindTreasureMainPanel:RefreshFindTreasureRect()
self.rectRoot.gameObject:SetActive(true)
end
--界面打开时调用(用于子类重写)
function FindTreasureMainPanel:OnOpen(...)
@ -186,6 +191,7 @@ end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function FindTreasureMainPanel:OnShow()
isPlayAnim = true
self.rectRoot.gameObject:SetActive(true)
self:OnShowPanelData(true,true,true)
end
function FindTreasureMainPanel:OnSortingOrderChange()
@ -391,6 +397,7 @@ function FindTreasureMainPanel:ActivityRewardSingleShow(_activityRewardGo,reward
quickGetButtonImage.sprite = self.spLoader:LoadSprite(GetResourcePath(ConfigManager.GetConfigData(ConfigName.ItemConfig,sConFigData.SpeedUpTake[1]).ResourceID))
quickGetButtonNumText.text = sConFigData.SpeedUpTake[2]
Util.AddOnceClick(jumpButton, function()
self.rectRoot.gameObject:SetActive(false)
UIManager.OpenPanel(UIName.FindTreasureDispatchPanel,rewardData)
end)
Util.AddOnceClick(grtButton, function()