星星数少了修改

dev_chengFeng
jiaoyangna 2021-11-04 16:20:50 +08:00
parent 7e2e3d8449
commit ce86215f53
1 changed files with 2 additions and 2 deletions

View File

@ -474,7 +474,7 @@ function SetHeroStars(spLoader, starGrid, star, type,_starSize,_scale,_pivot,rot
end
elseif star < 6 then
for i = 2, 24 do
if i <= star then
if i < star then
starPre.transform:GetChild(i - 1):GetComponent("Image").sprite = spLoader:LoadSprite(GetHeroStarImage[1])
starPre.transform:GetChild(i - 1):GetComponent("RectTransform").sizeDelta = starSize
if rotation then
@ -487,7 +487,7 @@ function SetHeroStars(spLoader, starGrid, star, type,_starSize,_scale,_pivot,rot
end
elseif star > 5 and star < 10 then
for i = 2, 24 do
if i <= star - 4 then
if i < star - 4 then
starPre.transform:GetChild(i - 1):GetComponent("Image").sprite = spLoader:LoadSprite(GetHeroStarImage[2])
starPre.transform:GetChild(i - 1):GetComponent("RectTransform").sizeDelta = starSize
if rotation then