fix bug
This commit is contained in:
parent
653c927780
commit
c50029683c
@ -8,11 +8,11 @@ function StarCell:init()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function StarCell:refresh(currStar)
|
function StarCell:refresh(currStar, showStar0)
|
||||||
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 == 1 then
|
if showStar0 and currStar == 0 and i == 1 then
|
||||||
v:setActive(true)
|
v:setActive(true)
|
||||||
v:setSprite(GFunc.getStarImg(starType, currStar))
|
v:setSprite(GFunc.getStarImg(starType, currStar))
|
||||||
elseif currStar > 0 and i <= star then
|
elseif currStar > 0 and i <= star then
|
||||||
|
|||||||
@ -81,7 +81,7 @@ function StarInfoComp:refreshInfo()
|
|||||||
self.nextLvTx:setActive(true)
|
self.nextLvTx:setActive(true)
|
||||||
local currStar = self.heroEntity:getStar()
|
local currStar = self.heroEntity:getStar()
|
||||||
local nextStar = currStar + 1
|
local nextStar = currStar + 1
|
||||||
self.currStarBg:refresh(currStar)
|
self.currStarBg:refresh(currStar, true)
|
||||||
self.nextStarBg:refresh(nextStar)
|
self.nextStarBg:refresh(nextStar)
|
||||||
local lv = self.heroEntity:getLv()
|
local lv = self.heroEntity:getLv()
|
||||||
local maxLv = self.heroEntity:getCurrMaxLv()
|
local maxLv = self.heroEntity:getCurrMaxLv()
|
||||||
|
|||||||
@ -305,6 +305,12 @@ function MainComp:refreshRedPoint()
|
|||||||
else
|
else
|
||||||
self.dailyChallengeBtn:removeRedPoint()
|
self.dailyChallengeBtn:removeRedPoint()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if DataManager.ChapterData:showRedPoint() then
|
||||||
|
self.chapterBoxBtn:addRedPoint(20, 20, 1)
|
||||||
|
else
|
||||||
|
self.chapterBoxBtn:removeRedPoint()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function MainComp:getArenaBtnPosition()
|
function MainComp:getArenaBtnPosition()
|
||||||
|
|||||||
@ -276,7 +276,13 @@ function MainCityUI:_bind()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
self:bind(DataManager.ArenaData, "isDirty", function()
|
||||||
|
if self.selectedIndex == GConst.MainCityConst.BOTTOM_PAGE.MAIN then
|
||||||
|
if self.subComps[self.selectedIndex] then
|
||||||
|
self.subComps[self.selectedIndex]:refresh()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
self:bind(DataManager.AIHelperData, "isDirty", function()
|
self:bind(DataManager.AIHelperData, "isDirty", function()
|
||||||
self:refreshSettingBtn()
|
self:refreshSettingBtn()
|
||||||
end)
|
end)
|
||||||
|
|||||||
@ -69,7 +69,7 @@ end
|
|||||||
function SummonBallCell:refreshInfo(heroId)
|
function SummonBallCell:refreshInfo(heroId)
|
||||||
self.heroId = heroId
|
self.heroId = heroId
|
||||||
local cfg = DataManager.HeroData:getHeroConfig(heroId)
|
local cfg = DataManager.HeroData:getHeroConfig(heroId)
|
||||||
-- self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, cfg.icon)
|
self.icon:setSprite(GConst.ATLAS_PATH.ICON_SUMMON, tostring(cfg.icon))
|
||||||
self.heroBg:setSprite(GConst.ATLAS_PATH.UI_SUMMON, "summon_card_" .. cfg.qlt)
|
self.heroBg:setSprite(GConst.ATLAS_PATH.UI_SUMMON, "summon_card_" .. cfg.qlt)
|
||||||
self.heroDec:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_DEC_QLT[cfg.qlt])
|
self.heroDec:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_DEC_QLT[cfg.qlt])
|
||||||
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[cfg.position])
|
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[cfg.position])
|
||||||
|
|||||||
@ -73,6 +73,7 @@ function SummonMainUI:onLoadRootComplete()
|
|||||||
self.btnWish = uiMap["summon_main_ui.node.btn_wish"] --心愿
|
self.btnWish = uiMap["summon_main_ui.node.btn_wish"] --心愿
|
||||||
self.btnWishTx = uiMap["summon_main_ui.node.btn_wish.unlock.tx_guarantee"] --心愿
|
self.btnWishTx = uiMap["summon_main_ui.node.btn_wish.unlock.tx_guarantee"] --心愿
|
||||||
self.btnWishIcon = uiMap["summon_main_ui.node.btn_wish.unlock.img_wish_icon"] --心愿
|
self.btnWishIcon = uiMap["summon_main_ui.node.btn_wish.unlock.img_wish_icon"] --心愿
|
||||||
|
self.btnWishAddImg = uiMap["summon_main_ui.node.btn_wish.add_img"]
|
||||||
|
|
||||||
-- self.toggleJump = uiMap["summon_main_ui.jump_tween"]:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TOGGLE)
|
-- self.toggleJump = uiMap["summon_main_ui.jump_tween"]:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TOGGLE)
|
||||||
-- self.isJumpTween = self.toggleJump.isOn
|
-- self.isJumpTween = self.toggleJump.isOn
|
||||||
@ -345,9 +346,11 @@ function SummonMainUI:refreshWishBtn()
|
|||||||
if cfg then
|
if cfg then
|
||||||
self.btnWishIcon:setSprite(GFunc.getHeroIcon(cfg.icon))
|
self.btnWishIcon:setSprite(GFunc.getHeroIcon(cfg.icon))
|
||||||
self.btnWish:setSprite(GConst.ATLAS_PATH.ICON_ITEM, GConst.FRAME_QLT[cfg.qlt])
|
self.btnWish:setSprite(GConst.ATLAS_PATH.ICON_ITEM, GConst.FRAME_QLT[cfg.qlt])
|
||||||
|
self.btnWishAddImg:setActive(false)
|
||||||
else
|
else
|
||||||
self.btnWishIcon:setSprite(GConst.ATLAS_PATH.COMMON, "common_alpha")
|
self.btnWishIcon:setSprite(GConst.ATLAS_PATH.COMMON, "common_alpha")
|
||||||
self.btnWish:setSprite(GConst.ATLAS_PATH.ICON_ITEM, "frame_1")
|
-- self.btnWish:setSprite(GConst.ATLAS_PATH.ICON_ITEM, "frame_1")
|
||||||
|
self.btnWishAddImg:setActive(true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -461,6 +461,9 @@ end
|
|||||||
|
|
||||||
-- 是否有入口红点
|
-- 是否有入口红点
|
||||||
function ArenaData:hasEntranceRedDot()
|
function ArenaData:hasEntranceRedDot()
|
||||||
|
if not self:isOpen() then
|
||||||
|
return false
|
||||||
|
end
|
||||||
return DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_ARENA_TICKET) > 0 or self:hasSeasonReward() or self:hasGradingRewardRedDot()
|
return DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_ARENA_TICKET) > 0 or self:hasSeasonReward() or self:hasGradingRewardRedDot()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -517,4 +517,16 @@ function ChapterData:getChapterStage(chapterId)
|
|||||||
end
|
end
|
||||||
--@endregion
|
--@endregion
|
||||||
|
|
||||||
|
--@region 红点
|
||||||
|
function ChapterData:showRedPoint(chapterId)
|
||||||
|
chapterId = chapterId or self:getChapterId()
|
||||||
|
local list = self:getChapterBoxRewardList(chapterId)
|
||||||
|
for i = 1, #list do
|
||||||
|
if self:boxCanGet(chapterId, i) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
--@endregion
|
||||||
return ChapterData
|
return ChapterData
|
||||||
Loading…
x
Reference in New Issue
Block a user