parent
a9ad3a8751
commit
4068849dd0
|
@ -26,7 +26,7 @@ function this:InitComponent()
|
||||||
local width = self.scroll.transform.rect.width
|
local width = self.scroll.transform.rect.width
|
||||||
|
|
||||||
self.scrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.scroll.transform,
|
self.scrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.scroll.transform,
|
||||||
self.itemPre, nil, Vector2.New(width, rootHight), 1, 5, Vector2.New(20, 45))
|
self.itemPre, nil, Vector2.New(width, rootHight), 1, 5, Vector2.New(20,75))
|
||||||
self.scrollView.moveTween.MomentumAmount = 1
|
self.scrollView.moveTween.MomentumAmount = 1
|
||||||
self.scrollView.moveTween.Strength = 2
|
self.scrollView.moveTween.Strength = 2
|
||||||
|
|
||||||
|
@ -134,8 +134,10 @@ function this:SetUpHero()
|
||||||
local heroId = curHeroId
|
local heroId = curHeroId
|
||||||
choosed:SetActive(false)
|
choosed:SetActive(false)
|
||||||
if heroId and heroId~="" then
|
if heroId and heroId~="" then
|
||||||
go:SetActive(true)
|
|
||||||
local heroData = HeroManager.GetSingleHeroData(heroId)
|
local heroData = HeroManager.GetSingleHeroData(heroId)
|
||||||
|
if heroData then
|
||||||
|
go:SetActive(true)
|
||||||
frame.sprite = self.spLoader:LoadSprite(GetBgByHeroNatural(heroData.heroConfig.Natural))
|
frame.sprite = self.spLoader:LoadSprite(GetBgByHeroNatural(heroData.heroConfig.Natural))
|
||||||
icon.sprite = self.spLoader:LoadSprite(GetResourcePath(heroData.heroConfig.Icon))
|
icon.sprite = self.spLoader:LoadSprite(GetResourcePath(heroData.heroConfig.Icon))
|
||||||
proIcon.sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName))
|
proIcon.sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName))
|
||||||
|
@ -168,6 +170,8 @@ function this:SetUpHero()
|
||||||
local endTime=buildData.heroStarTime+math.ceil((max-curValue)/buildData.dataSingle.Gain)*60
|
local endTime=buildData.heroStarTime+math.ceil((max-curValue)/buildData.dataSingle.Gain)*60
|
||||||
leftTime=endTime-GetTimeStamp()
|
leftTime=endTime-GetTimeStamp()
|
||||||
this:SetTime(name)
|
this:SetTime(name)
|
||||||
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
go:SetActive(false)
|
go:SetActive(false)
|
||||||
end
|
end
|
||||||
|
|
|
@ -410,6 +410,17 @@ function RewardEquipSingleShowPopup2:OnShow()
|
||||||
_BaseProList[num]:GetComponent("Text").text = "神将潜能等级+"..equipConfigData.PotentialNew[2]
|
_BaseProList[num]:GetComponent("Text").text = "神将潜能等级+"..equipConfigData.PotentialNew[2]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if equipConfigData.HeroGitUp>0 then
|
||||||
|
num=num+1
|
||||||
|
if not _BaseProList[num] then
|
||||||
|
_BaseProList[num] = newObjToParent(self.baseProPre, self.baseProGrid)
|
||||||
|
end
|
||||||
|
_BaseProList[num]:SetActive(true)
|
||||||
|
Util.GetGameObject(_BaseProList[num], "curProVale").gameObject:SetActive(false)
|
||||||
|
if equipConfigData.Position==7 then
|
||||||
|
_BaseProList[num]:GetComponent("Text").text =string.format("全体神将礼物属性+%s%%",equipConfigData.HeroGitUp/100)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- for index, prop in ipairs(equipConfigData.PlayerProperty) do
|
-- for index, prop in ipairs(equipConfigData.PlayerProperty) do
|
||||||
-- LogError("prop[1]=========="..prop[1])
|
-- LogError("prop[1]=========="..prop[1])
|
||||||
|
|
|
@ -512,7 +512,7 @@ function this.EquipInfo()
|
||||||
Util.AddOnceClick(btn,function()
|
Util.AddOnceClick(btn,function()
|
||||||
if did and data then
|
if did and data then
|
||||||
-- UIManager.OpenPanel(UIName.RoleEquipTreasureChangePopup,this,2,curHeroData,data,nil,pos,0)
|
-- UIManager.OpenPanel(UIName.RoleEquipTreasureChangePopup,this,2,curHeroData,data,nil,pos,0)
|
||||||
UIManager.OpenPanel(UIName.RewardTalismanSingleShowPopup2,this,data,0,false,nil,curHeroData,5)
|
UIManager.OpenPanel(UIName.RewardTalismanSingleShowPopup2,this,data,0,false,nil,curHeroData,n+4)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
|
@ -384,7 +384,7 @@ function RoleInfoPanel:OnShow()
|
||||||
|
|
||||||
this.curLiveObj = HeroManager.LoadHerolive(curHeroData,this.curObj)
|
this.curLiveObj = HeroManager.LoadHerolive(curHeroData,this.curObj)
|
||||||
local t=ConfigManager.TryGetAllConfigsDataByKey(ConfigName.Train,"HeroID",curHeroData.id)
|
local t=ConfigManager.TryGetAllConfigsDataByKey(ConfigName.Train,"HeroID",curHeroData.id)
|
||||||
this.trainingBtn:SetActive(#t~=0)
|
this.trainingBtn:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.Train) and #t~=0)
|
||||||
local leftToward=0
|
local leftToward=0
|
||||||
if leftHeroData.skinId and leftHeroData.skinId~=0 then
|
if leftHeroData.skinId and leftHeroData.skinId~=0 then
|
||||||
local roleCon=ConfigManager.TryGetConfigData(ConfigName.RoleConfig,leftHeroData.skinId)
|
local roleCon=ConfigManager.TryGetConfigData(ConfigName.RoleConfig,leftHeroData.skinId)
|
||||||
|
|
Loading…
Reference in New Issue