【优化】心魔试炼高级阶段奖励没有展示,添加层数奖励
parent
a382146703
commit
3a7324883e
File diff suppressed because it is too large
Load Diff
|
@ -120,7 +120,7 @@ function this:BindEvent()
|
||||||
CheckRedPointStatus(RedPointType.Trial)
|
CheckRedPointStatus(RedPointType.Trial)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
end)
|
end,1)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
missionView.BindEvent()
|
missionView.BindEvent()
|
||||||
|
|
|
@ -116,7 +116,7 @@ function MonsterCampPanel:BindEvent()
|
||||||
CheckRedPointStatus(RedPointType.EpicExplore)
|
CheckRedPointStatus(RedPointType.EpicExplore)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
end)
|
end,2)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ end
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
function MonsterCampPanel:OnOpen(...)
|
function MonsterCampPanel:OnOpen(...)
|
||||||
SoundManager.PlayMusic(SoundConfig.BGM_Carbon)
|
SoundManager.PlayMusic(SoundConfig.BGM_Carbon)
|
||||||
|
CheckRedPointStatus(RedPointType.EpicExplore)
|
||||||
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.MonsterCamp })
|
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.MonsterCamp })
|
||||||
-- 初始化界面数据
|
-- 初始化界面数据
|
||||||
this.InitShow()
|
this.InitShow()
|
||||||
|
|
|
@ -6,20 +6,15 @@ local rewardConfig
|
||||||
local itemList={} --预设容器
|
local itemList={} --预设容器
|
||||||
local sortingOrder=0
|
local sortingOrder=0
|
||||||
local getFunc = {}
|
local getFunc = {}
|
||||||
|
local pres = {}
|
||||||
|
local curType = 0
|
||||||
function TrialRewardPopup:InitComponent()
|
function TrialRewardPopup:InitComponent()
|
||||||
this.panel=Util.GetGameObject(this.gameObject,"Panel")
|
this.panel=Util.GetGameObject(this.gameObject,"Panel")
|
||||||
this.backBtn=Util.GetGameObject(this.panel,"BackBtn")
|
this.backBtn=Util.GetGameObject(this.panel,"BackBtn")
|
||||||
|
|
||||||
this.scroll=Util.GetGameObject(this.panel,"Scroll")
|
this.scroll=Util.GetGameObject(this.panel,"Scroll")
|
||||||
this.pre=Util.GetGameObject(this.panel,"Scroll/Pre")
|
pres[1]=Util.GetGameObject(this.panel,"Scroll/Pre")
|
||||||
this.scrollView=SubUIManager.Open(SubUIConfig.ScrollCycleView,this.scroll.transform,this.pre, nil,
|
pres[2]=Util.GetGameObject(this.panel,"Scroll/Pre3")
|
||||||
Vector2.New(this.scroll.transform.rect.width,this.scroll.transform.rect.height),1,1,Vector2.New(0,10))
|
|
||||||
this.scrollView.gameObject:GetComponent("RectTransform").anchoredPosition= Vector2.New(0,0)
|
|
||||||
this.scrollView.gameObject:GetComponent("RectTransform").anchorMin = Vector2.New(0.5, 0.5)
|
|
||||||
this.scrollView.gameObject:GetComponent("RectTransform").anchorMax = Vector2.New(0.5, 0.5)
|
|
||||||
this.scrollView.gameObject:GetComponent("RectTransform").pivot = Vector2.New(0.5, 0.5)
|
|
||||||
this.scrollView.moveTween.MomentumAmount = 1
|
|
||||||
this.scrollView.moveTween.Strength = 2
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function TrialRewardPopup:BindEvent()
|
function TrialRewardPopup:BindEvent()
|
||||||
|
@ -43,19 +38,29 @@ function TrialRewardPopup:OnOpen(...)
|
||||||
local arg = {...}
|
local arg = {...}
|
||||||
rewardConfig = arg[1]
|
rewardConfig = arg[1]
|
||||||
getFunc = arg[2]
|
getFunc = arg[2]
|
||||||
|
curType = arg[3]
|
||||||
|
this.pre = pres[curType]
|
||||||
end
|
end
|
||||||
|
|
||||||
function TrialRewardPopup:OnShow()
|
function TrialRewardPopup:OnShow()
|
||||||
|
this.scrollView=SubUIManager.Open(SubUIConfig.ScrollCycleView,this.scroll.transform,this.pre, nil,
|
||||||
|
Vector2.New(this.scroll.transform.rect.width,this.scroll.transform.rect.height),1,1,Vector2.New(0,5))
|
||||||
|
this.scrollView.gameObject:GetComponent("RectTransform").anchoredPosition= Vector2.New(0,0)
|
||||||
|
this.scrollView.gameObject:GetComponent("RectTransform").anchorMin = Vector2.New(0.5, 0.5)
|
||||||
|
this.scrollView.gameObject:GetComponent("RectTransform").anchorMax = Vector2.New(0.5, 0.5)
|
||||||
|
this.scrollView.gameObject:GetComponent("RectTransform").pivot = Vector2.New(0.5, 0.5)
|
||||||
|
this.scrollView.moveTween.MomentumAmount = 1
|
||||||
|
this.scrollView.moveTween.Strength = 2
|
||||||
this.RefreshPanel()
|
this.RefreshPanel()
|
||||||
sortingOrder = self.sortingOrder
|
sortingOrder = self.sortingOrder
|
||||||
end
|
end
|
||||||
|
|
||||||
function TrialRewardPopup:OnClose()
|
function TrialRewardPopup:OnClose()
|
||||||
|
SubUIManager.Close(this.scrollView)
|
||||||
end
|
end
|
||||||
|
|
||||||
function TrialRewardPopup:OnDestroy()
|
function TrialRewardPopup:OnDestroy()
|
||||||
this.scrollView=nil
|
this.scrollView=nil
|
||||||
itemList={}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,7 +79,12 @@ function this.SetScrollPre(root,data)
|
||||||
local goBtn=Util.GetGameObject(root,"GoBtn")
|
local goBtn=Util.GetGameObject(root,"GoBtn")
|
||||||
local getBtn=Util.GetGameObject(root,"GetBtn")
|
local getBtn=Util.GetGameObject(root,"GetBtn")
|
||||||
local mask=Util.GetGameObject(root,"mask")
|
local mask=Util.GetGameObject(root,"mask")
|
||||||
|
local pregress = Util.GetGameObject(root,"getRewardProgress")
|
||||||
|
if pregress then
|
||||||
|
if curType == 2 then
|
||||||
|
pregress:GetComponent("Text").text = "("..MonsterCampManager.monsterWave.."/"..data.Id..")"
|
||||||
|
end
|
||||||
|
end
|
||||||
info.text=data.info --string.format( Language[11616],data.Count,MapTrialManager.GetKilCount(),data.Count)
|
info.text=data.info --string.format( Language[11616],data.Count,MapTrialManager.GetKilCount(),data.Count)
|
||||||
--ResetItemView(root,grid.transform,itemList,#data.BoxReward,0.9,sortingOrder,false,data.BoxReward)
|
--ResetItemView(root,grid.transform,itemList,#data.BoxReward,0.9,sortingOrder,false,data.BoxReward)
|
||||||
if not itemList[root] then
|
if not itemList[root] then
|
||||||
|
@ -91,11 +101,6 @@ function this.SetScrollPre(root,data)
|
||||||
itemList[root][i]:OnOpen(false, data.BoxReward[i], 0.9,false,false,false,sortingOrder)
|
itemList[root][i]:OnOpen(false, data.BoxReward[i], 0.9,false,false,false,sortingOrder)
|
||||||
itemList[root][i].gameObject:SetActive(true)
|
itemList[root][i].gameObject:SetActive(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
--按钮状态
|
|
||||||
--local s=MapTrialManager.GetTrialRewardState(data.Id)
|
|
||||||
goBtn:GetComponent("Button").interactable=data.state~=0
|
|
||||||
|
|
||||||
if data.state==0 then
|
if data.state==0 then
|
||||||
-- goText.text=Language[10350]
|
-- goText.text=Language[10350]
|
||||||
mask:SetActive(true)
|
mask:SetActive(true)
|
||||||
|
@ -123,8 +128,6 @@ function this.SetScrollPre(root,data)
|
||||||
getBtn:SetActive(false)
|
getBtn:SetActive(false)
|
||||||
this.ChangeState(data.Id)
|
this.ChangeState(data.Id)
|
||||||
this.RefreshPanel()
|
this.RefreshPanel()
|
||||||
CheckRedPointStatus(RedPointType.TrialReward)
|
|
||||||
CheckRedPointStatus(RedPointType.Trial)
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in New Issue