fix bug
This commit is contained in:
parent
46f972483a
commit
8df787b289
@ -1972,8 +1972,10 @@ function GFunc.randomDrop(dropList)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- 获取属性描述和数值
|
-- 获取属性描述和数值
|
||||||
function GFunc.getStarImg(starType)
|
function GFunc.getStarImg(starType, currStar)
|
||||||
if starType == GConst.HeroConst.STAR_TYPE.LV_1 then
|
if currStar and currStar == 0 then
|
||||||
|
return GConst.ATLAS_PATH.COMMON, "common_star_0"
|
||||||
|
elseif starType == GConst.HeroConst.STAR_TYPE.LV_1 then
|
||||||
return GConst.ATLAS_PATH.COMMON, "common_star_1"
|
return GConst.ATLAS_PATH.COMMON, "common_star_1"
|
||||||
elseif starType == GConst.HeroConst.STAR_TYPE.LV_2 then
|
elseif starType == GConst.HeroConst.STAR_TYPE.LV_2 then
|
||||||
return GConst.ATLAS_PATH.COMMON, "common_star_2"
|
return GConst.ATLAS_PATH.COMMON, "common_star_2"
|
||||||
|
|||||||
@ -12,7 +12,10 @@ function StarCell:refresh(currStar)
|
|||||||
local starType = math.ceil(currStar / 5)
|
local starType = math.ceil(currStar / 5)
|
||||||
for i, v in ipairs(self.starImgs) do
|
for i, v in ipairs(self.starImgs) do
|
||||||
local star = (currStar - 1)%5 + 1
|
local star = (currStar - 1)%5 + 1
|
||||||
if currStar > 0 and i <= star then
|
if currStar == 0 and i == 1 then
|
||||||
|
v:setActive(true)
|
||||||
|
v:setSprite(GFunc.getStarImg(starType, currStar))
|
||||||
|
elseif currStar > 0 and i <= star then
|
||||||
v:setActive(true)
|
v:setActive(true)
|
||||||
v:setSprite(GFunc.getStarImg(starType))
|
v:setSprite(GFunc.getStarImg(starType))
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user