界面修改
parent
a1fa271959
commit
882f77e164
File diff suppressed because it is too large
Load Diff
|
@ -13,25 +13,34 @@ function this:InitComponent()
|
|||
this.mask = Util.GetGameObject(self.gameObject, "mask")
|
||||
this.closeBtn = Util.GetGameObject(self.gameObject, "root/bg/closeBtn")
|
||||
this.titleText = Util.GetGameObject(self.gameObject, "root/bg/titleText"):GetComponent("Text")
|
||||
this.costTitle = Util.GetGameObject(self.gameObject, "root/costTitle"):GetComponent("Text")
|
||||
this.upLvBtn = Util.GetGameObject(self.gameObject, "root/upLvBtn")
|
||||
this.upStarBtn = Util.GetGameObject(self.gameObject, "root/upStarBtn")
|
||||
this.costGrid = Util.GetGameObject(self.gameObject, "root/costGrid")
|
||||
this.costItem=Util.GetGameObject(self.gameObject, "root/costGrid/costItem")
|
||||
this.curProp=Util.GetGameObject(self.gameObject, "root/curProp")
|
||||
this.nextProp=Util.GetGameObject(self.gameObject, "root/nextProp")
|
||||
|
||||
this.prefab=Util.GetGameObject(self.gameObject, "root/prefab")
|
||||
this.itemView= SubUIManager.Open(SubUIConfig.ItemView, this.prefab.transform)
|
||||
|
||||
this.curSkillDes=Util.GetGameObject(self.gameObject, "root/curSkillDes"):GetComponent("Text")
|
||||
this.nextSkillDes=Util.GetGameObject(self.gameObject, "root/nextSkillDes"):GetComponent("Text")
|
||||
this.lvLayout=Util.GetGameObject(self.gameObject, "root/lvLayout")
|
||||
this.curLvText=Util.GetGameObject(this.lvLayout, "curLv"):GetComponent("Text")
|
||||
this.nextLvText=Util.GetGameObject(this.lvLayout, "nextLv"):GetComponent("Text")
|
||||
|
||||
this.proyLayout=Util.GetGameObject(self.gameObject, "root/proyLayout")
|
||||
this.curProp=Util.GetGameObject(this.proyLayout, "curProp")
|
||||
this.nextProp=Util.GetGameObject(this.proyLayout, "nextProp")
|
||||
|
||||
this.skillLayout=Util.GetGameObject(self.gameObject, "root/skillLayout")
|
||||
this.curSkillDes=Util.GetGameObject(this.skillLayout, "curSkillDes"):GetComponent("Text")
|
||||
this.nextSkillDes=Util.GetGameObject(this.skillLayout, "nextSkillDes"):GetComponent("Text")
|
||||
|
||||
--消耗相关
|
||||
this.costLayout=Util.GetGameObject(self.gameObject, "root/costLayout")
|
||||
this.costGrid = Util.GetGameObject(this.costLayout, "costGrid")
|
||||
this.costItem=Util.GetGameObject(this.costLayout, "costGrid/costItem")
|
||||
this.frame=Util.GetGameObject(this.costItem, "frame"):GetComponent("Image")
|
||||
this.iconDefault=Util.GetGameObject(this.costItem, "iconDefault")
|
||||
this.icon=Util.GetGameObject(this.costItem, "icon"):GetComponent("Image")
|
||||
this.addBtn=Util.GetGameObject(this.costItem, "add")
|
||||
this.num=Util.GetGameObject(this.costItem, "num"):GetComponent("Text")
|
||||
|
||||
this.upLvBtn = Util.GetGameObject(this.costLayout, "upLvBtn")
|
||||
this.upStarBtn = Util.GetGameObject(this.costLayout, "upStarBtn")
|
||||
end
|
||||
|
||||
function this:BindEvent()
|
||||
|
@ -101,11 +110,20 @@ function this.UpdateWin()
|
|||
this.titleText.text=cardData.name
|
||||
local propData=IncarnationManager.GetChangeCardProperty(curCardId)
|
||||
if type==1 then
|
||||
this.costTitle.text="升级消耗"
|
||||
Util.GetGameObject(this.curLvText.gameObject, "starImg"):SetActive(false)
|
||||
Util.GetGameObject(this.nextLvText.gameObject, "starImg"):SetActive(false)
|
||||
this.curLvText.text=curLevel.."级"
|
||||
this.nextLvText.text=(curLevel+1).."级"
|
||||
else
|
||||
Util.GetGameObject(this.curLvText.gameObject, "starImg"):SetActive(true)
|
||||
Util.GetGameObject(this.nextLvText.gameObject, "starImg"):SetActive(true)
|
||||
this.curLvText.text=curStar
|
||||
this.nextLvText.text=curStar+1
|
||||
end
|
||||
if type==1 then
|
||||
this.upLvBtn.gameObject:SetActive(true)
|
||||
this.upStarBtn.gameObject:SetActive(false)
|
||||
this.curSkillDes.gameObject:SetActive(false)
|
||||
this.nextSkillDes.gameObject:SetActive(false)
|
||||
this.skillLayout.gameObject:SetActive(false)
|
||||
this.SetPropInfo(this.curProp,curLevel,propData)
|
||||
if this.CheckLevelLimit() then
|
||||
this.nextProp.gameObject:SetActive(false)
|
||||
|
@ -120,9 +138,9 @@ function this.UpdateWin()
|
|||
end
|
||||
|
||||
else
|
||||
this.costTitle.text="升星消耗"
|
||||
this.upLvBtn.gameObject:SetActive(false)
|
||||
this.upStarBtn.gameObject:SetActive(true)
|
||||
this.skillLayout.gameObject:SetActive(true)
|
||||
this.curSkillDes.gameObject:SetActive(true)
|
||||
this.curSkillDes.text=IncarnationManager.GetSkillDesStr(curCardId,curStar)
|
||||
this.SetPropInfo(this.curProp,curStar,propData)
|
||||
|
@ -144,11 +162,7 @@ function this.UpdateWin()
|
|||
end
|
||||
|
||||
function this.SetPropInfo(propObj,lv,propData)
|
||||
if type==1 then
|
||||
Util.GetGameObject(propObj, "level"):GetComponent("Text").text="等级"..lv
|
||||
else
|
||||
Util.GetGameObject(propObj, "level"):GetComponent("Text").text="星级"..lv
|
||||
end
|
||||
|
||||
local propGrid=Util.GetGameObject(propObj, "propGrid")
|
||||
local index=0
|
||||
for k,v in pairs(propData) do
|
||||
|
|
Loading…
Reference in New Issue