碎片tips显示错误
This commit is contained in:
parent
fe8d9aede1
commit
88aa6a6cf3
@ -23,7 +23,7 @@ function HeroFragmentTips:onLoadRootComplete()
|
|||||||
end
|
end
|
||||||
self.heroList = {}
|
self.heroList = {}
|
||||||
for _, v in ipairs(drop) do
|
for _, v in ipairs(drop) do
|
||||||
if DataManager.HeroData:getHeroIsActive(v.id) then
|
if DataManager.HeroData:getHeroIsUnlock(v.id) then
|
||||||
table.insert(self.heroList, v.id)
|
table.insert(self.heroList, v.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -84,6 +84,15 @@ function HeroData:getHeroIsActive(id)
|
|||||||
return entity:isActived()
|
return entity:isActived()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function HeroData:getHeroIsUnlock(id)
|
||||||
|
local entity = self.heroes[id]
|
||||||
|
if entity == nil then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return entity:isUnlock()
|
||||||
|
end
|
||||||
|
|
||||||
function HeroData:getUnlockHeroCount()
|
function HeroData:getUnlockHeroCount()
|
||||||
local count = 0
|
local count = 0
|
||||||
for id, entity in pairs(self.heroes) do
|
for id, entity in pairs(self.heroes) do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user