parent
6e2deee6f1
commit
e3db539691
|
@ -378,6 +378,7 @@ GameEvent = {
|
||||||
FindTreasure={
|
FindTreasure={
|
||||||
RefreshFindTreasure="FindTreasure.RefreshFindTreasure",
|
RefreshFindTreasure="FindTreasure.RefreshFindTreasure",
|
||||||
RefreshFindTreasureRedPot="FindTreasure.RefreshFindTreasureRedPot",
|
RefreshFindTreasureRedPot="FindTreasure.RefreshFindTreasureRedPot",
|
||||||
|
RefreshFindTreasureRect="FindTreasure.RefreshFindTreasureRect",
|
||||||
},
|
},
|
||||||
TopMatch={
|
TopMatch={
|
||||||
OnTopMatchDataUpdate = "TopMatch.OnTopMatchDataUpdate",
|
OnTopMatchDataUpdate = "TopMatch.OnTopMatchDataUpdate",
|
||||||
|
|
|
@ -522,7 +522,7 @@ function FindTreasureDispatchPanel:TimeStampToDateString(second)
|
||||||
end
|
end
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
function FindTreasureDispatchPanel:OnClose()
|
function FindTreasureDispatchPanel:OnClose()
|
||||||
|
Game.GlobalEvent:DispatchEvent(GameEvent.FindTreasure.RefreshFindTreasureRect)
|
||||||
if timer then
|
if timer then
|
||||||
timer:Stop()
|
timer:Stop()
|
||||||
timer = nil
|
timer = nil
|
||||||
|
|
|
@ -32,6 +32,7 @@ function FindTreasureMainPanel:InitComponent()
|
||||||
-- end
|
-- end
|
||||||
-- findTreasureItemsGrid[i] = curexpertRewardItemsGri
|
-- findTreasureItemsGrid[i] = curexpertRewardItemsGri
|
||||||
-- end
|
-- end
|
||||||
|
self.rectRoot = Util.GetGameObject(self.gameObject, "rect")
|
||||||
local v = Util.GetGameObject(self.gameObject, "rect/rect (1)"):GetComponent("RectTransform").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.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))
|
self.rewardPre, nil, Vector2.New(v.width, v.height), 1, 1, Vector2.New(0,-5))
|
||||||
|
@ -167,16 +168,20 @@ end
|
||||||
|
|
||||||
--添加事件监听(用于子类重写)
|
--添加事件监听(用于子类重写)
|
||||||
function FindTreasureMainPanel:AddListener()
|
function FindTreasureMainPanel:AddListener()
|
||||||
|
Game.GlobalEvent:AddEvent(GameEvent.FindTreasure.RefreshFindTreasureRect, self.RefreshFindTreasureRect,self)
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.FindTreasure.RefreshFindTreasure, self.OnShowPanelData,self)
|
Game.GlobalEvent:AddEvent(GameEvent.FindTreasure.RefreshFindTreasure, self.OnShowPanelData,self)
|
||||||
end
|
end
|
||||||
|
|
||||||
--移除事件监听(用于子类重写)
|
--移除事件监听(用于子类重写)
|
||||||
function FindTreasureMainPanel:RemoveListener()
|
function FindTreasureMainPanel:RemoveListener()
|
||||||
|
Game.GlobalEvent:RemoveEvent(GameEvent.FindTreasure.RefreshFindTreasureRect, self.RefreshFindTreasureRect,self)
|
||||||
Game.GlobalEvent:RemoveEvent(GameEvent.FindTreasure.RefreshFindTreasure, self.OnShowPanelData,self)
|
Game.GlobalEvent:RemoveEvent(GameEvent.FindTreasure.RefreshFindTreasure, self.OnShowPanelData,self)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function FindTreasureMainPanel:RefreshFindTreasureRect()
|
||||||
|
self.rectRoot.gameObject:SetActive(true)
|
||||||
|
end
|
||||||
|
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
function FindTreasureMainPanel:OnOpen(...)
|
function FindTreasureMainPanel:OnOpen(...)
|
||||||
|
|
||||||
|
@ -186,6 +191,7 @@ end
|
||||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||||
function FindTreasureMainPanel:OnShow()
|
function FindTreasureMainPanel:OnShow()
|
||||||
isPlayAnim = true
|
isPlayAnim = true
|
||||||
|
self.rectRoot.gameObject:SetActive(true)
|
||||||
self:OnShowPanelData(true,true,true)
|
self:OnShowPanelData(true,true,true)
|
||||||
end
|
end
|
||||||
function FindTreasureMainPanel:OnSortingOrderChange()
|
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))
|
quickGetButtonImage.sprite = self.spLoader:LoadSprite(GetResourcePath(ConfigManager.GetConfigData(ConfigName.ItemConfig,sConFigData.SpeedUpTake[1]).ResourceID))
|
||||||
quickGetButtonNumText.text = sConFigData.SpeedUpTake[2]
|
quickGetButtonNumText.text = sConFigData.SpeedUpTake[2]
|
||||||
Util.AddOnceClick(jumpButton, function()
|
Util.AddOnceClick(jumpButton, function()
|
||||||
|
self.rectRoot.gameObject:SetActive(false)
|
||||||
UIManager.OpenPanel(UIName.FindTreasureDispatchPanel,rewardData)
|
UIManager.OpenPanel(UIName.FindTreasureDispatchPanel,rewardData)
|
||||||
end)
|
end)
|
||||||
Util.AddOnceClick(grtButton, function()
|
Util.AddOnceClick(grtButton, function()
|
||||||
|
|
Loading…
Reference in New Issue