界面处理
This commit is contained in:
parent
2f28925a71
commit
213c4c1188
@ -44,8 +44,8 @@ local hero = {
|
|||||||
2300000,
|
2300000,
|
||||||
2400000
|
2400000
|
||||||
},
|
},
|
||||||
["model_id"]="p0001",
|
["model_id"]="p0005",
|
||||||
["icon"]="1",
|
["icon"]="5",
|
||||||
["item_id"]=12001,
|
["item_id"]=12001,
|
||||||
["unlock_chapter"]=1
|
["unlock_chapter"]=1
|
||||||
},
|
},
|
||||||
@ -144,8 +144,8 @@ local hero = {
|
|||||||
2300000,
|
2300000,
|
||||||
2400000
|
2400000
|
||||||
},
|
},
|
||||||
["model_id"]="p0006",
|
["model_id"]="p0007",
|
||||||
["icon"]="6",
|
["icon"]="7",
|
||||||
["item_id"]=23001,
|
["item_id"]=23001,
|
||||||
["unlock_chapter"]=7
|
["unlock_chapter"]=7
|
||||||
},
|
},
|
||||||
@ -194,8 +194,8 @@ local hero = {
|
|||||||
2300000,
|
2300000,
|
||||||
2400000
|
2400000
|
||||||
},
|
},
|
||||||
["model_id"]="p0003",
|
["model_id"]="p0001",
|
||||||
["icon"]="3",
|
["icon"]="1",
|
||||||
["item_id"]=32001,
|
["item_id"]=32001,
|
||||||
["unlock_chapter"]=0
|
["unlock_chapter"]=0
|
||||||
},
|
},
|
||||||
@ -244,8 +244,8 @@ local hero = {
|
|||||||
2300000,
|
2300000,
|
||||||
2400000
|
2400000
|
||||||
},
|
},
|
||||||
["model_id"]="p0007",
|
["model_id"]="p0006",
|
||||||
["icon"]="7",
|
["icon"]="6",
|
||||||
["item_id"]=33001,
|
["item_id"]=33001,
|
||||||
["unlock_chapter"]=9
|
["unlock_chapter"]=9
|
||||||
},
|
},
|
||||||
@ -294,8 +294,8 @@ local hero = {
|
|||||||
2300000,
|
2300000,
|
||||||
2400000
|
2400000
|
||||||
},
|
},
|
||||||
["model_id"]="p0004",
|
["model_id"]="p0003",
|
||||||
["icon"]="4",
|
["icon"]="3",
|
||||||
["item_id"]=42001,
|
["item_id"]=42001,
|
||||||
["unlock_chapter"]=0
|
["unlock_chapter"]=0
|
||||||
},
|
},
|
||||||
@ -394,8 +394,8 @@ local hero = {
|
|||||||
2300000,
|
2300000,
|
||||||
2400000
|
2400000
|
||||||
},
|
},
|
||||||
["model_id"]="p0005",
|
["model_id"]="p0004",
|
||||||
["icon"]="5",
|
["icon"]="4",
|
||||||
["item_id"]=52001,
|
["item_id"]=52001,
|
||||||
["unlock_chapter"]=3
|
["unlock_chapter"]=3
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,8 @@ function HeroCell:init()
|
|||||||
self.progressTx = uiMap["hero_cell.hero_bg.progress_tx"]
|
self.progressTx = uiMap["hero_cell.hero_bg.progress_tx"]
|
||||||
self.lvTx = uiMap["hero_cell.hero_bg.lv_tx"]
|
self.lvTx = uiMap["hero_cell.hero_bg.lv_tx"]
|
||||||
self.unlockTx = uiMap["hero_cell.hero_bg.unlock_tx"]
|
self.unlockTx = uiMap["hero_cell.hero_bg.unlock_tx"]
|
||||||
|
self.lvUpArrow = uiMap["hero_cell.hero_bg.progress_bg.arrow"]
|
||||||
|
self.fragmenImg = uiMap["hero_cell.hero_bg.progress_bg.fragment_img"]
|
||||||
self.isGray = false
|
self.isGray = false
|
||||||
self.baseObject:addClickListener(function()
|
self.baseObject:addClickListener(function()
|
||||||
if self.clickCallback then
|
if self.clickCallback then
|
||||||
@ -23,6 +25,9 @@ function HeroCell:refresh(heroEntity, isGray)
|
|||||||
local heroInfo = heroEntity:getConfig()
|
local heroInfo = heroEntity:getConfig()
|
||||||
self:_refresh(heroInfo, isGray)
|
self:_refresh(heroInfo, isGray)
|
||||||
|
|
||||||
|
local canLvUp = heroEntity:canLvUp()
|
||||||
|
self.lvUpArrow:setVisible(canLvUp)
|
||||||
|
self.fragmenImg:setVisible(not canLvUp)
|
||||||
local materials = heroEntity:getLvUpMaterials() or {}
|
local materials = heroEntity:getLvUpMaterials() or {}
|
||||||
local fragmentCount = DataManager.BagData.ItemData:getItemNumById(heroEntity:getFramentId())
|
local fragmentCount = DataManager.BagData.ItemData:getItemNumById(heroEntity:getFramentId())
|
||||||
local needFragmentCount = materials[1] or 1
|
local needFragmentCount = materials[1] or 1
|
||||||
@ -56,6 +61,8 @@ function HeroCell:refreshWithCfgId(id, isGray)
|
|||||||
self.lvTx:setVisible(true)
|
self.lvTx:setVisible(true)
|
||||||
self.progressBg:setVisible(true)
|
self.progressBg:setVisible(true)
|
||||||
self.unlockTx:setVisible(false)
|
self.unlockTx:setVisible(false)
|
||||||
|
self.lvUpArrow:setVisible(false)
|
||||||
|
self.fragmenImg:setVisible(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroCell:_refresh(heroInfo, isGray)
|
function HeroCell:_refresh(heroInfo, isGray)
|
||||||
|
|||||||
@ -72,6 +72,10 @@ function HeroDetailUI:_display()
|
|||||||
|
|
||||||
uiMap["hero_detail_ui.bg.fragment_bg"]:setVisible(not self.heroEntity:isMaxLv())
|
uiMap["hero_detail_ui.bg.fragment_bg"]:setVisible(not self.heroEntity:isMaxLv())
|
||||||
|
|
||||||
|
local canLvUp = self.heroEntity:canLvUp()
|
||||||
|
uiMap["hero_detail_ui.bg.fragment_bg.arrow"]:setVisible(canLvUp)
|
||||||
|
uiMap["hero_detail_ui.bg.fragment_icon"]:setVisible(not canLvUp)
|
||||||
|
|
||||||
local lv = self.heroEntity:getLv()
|
local lv = self.heroEntity:getLv()
|
||||||
local str
|
local str
|
||||||
local hpStr
|
local hpStr
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user