From 7f822a3025792acbf4370d9038e7305b4ae728c1 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Wed, 27 Aug 2025 14:22:05 +0800 Subject: [PATCH] fix bug --- lua/app/bf/unity/uiprefab_object.lua | 4 +- lua/app/ui/arena/arena_season_reward_ui.lua | 2 +- lua/app/ui/arena/arena_ui.lua | 4 +- lua/app/ui/common/cell/hero_cell.lua | 2 +- lua/app/ui/common/cell/player_head_cell.lua | 2 +- .../common/component/hero_formation_comp.lua | 6 +-- .../ui/daily_challenge/daily_challenge_ui.lua | 2 +- lua/app/ui/hero/hero_detail_ui.lua | 38 ++++++------------- lua/app/ui/hero/hero_info_comp.lua | 11 ++++-- lua/app/ui/idle/idle_drop_ui.lua | 6 +-- lua/app/ui/main_city/component/arena_comp.lua | 4 +- lua/app/ui/main_city/component/main_comp.lua | 6 +-- lua/app/ui/main_city/main_city_ui.lua | 12 +++--- lua/app/ui/player_info/avatar_cell.lua | 2 +- lua/app/ui/player_info/frame_cell.lua | 2 +- lua/app/ui/player_info/player_info_ui.lua | 4 +- lua/app/ui/summon/summon_main_ui.lua | 4 +- lua/app/ui/summon/summon_reward_ui.lua | 6 +-- lua/app/userdata/hero/hero_entity.lua | 9 +++++ 19 files changed, 63 insertions(+), 63 deletions(-) diff --git a/lua/app/bf/unity/uiprefab_object.lua b/lua/app/bf/unity/uiprefab_object.lua index ffa3e57d..df43fe27 100644 --- a/lua/app/bf/unity/uiprefab_object.lua +++ b/lua/app/bf/unity/uiprefab_object.lua @@ -772,7 +772,7 @@ function UIPrefabObject:addRedPoint(offsetX, offsetY, scale, iconName, count, na local uiMap = prefabObject:genAllChildren() self.redPoint:setAnchoredPosition(offsetX or 0, offsetY or 0) self.redPoint:setLocalScale(scale, scale, scale) - iconName = iconName or "common_point" + iconName = iconName or "common_info_1" self.redPoint:setSprite(GConst.ATLAS_PATH.COMMON, iconName) GFunc.getShakeSeq(self.redPoint, false, scale, true) if native then @@ -787,7 +787,7 @@ function UIPrefabObject:addRedPoint(offsetX, offsetY, scale, iconName, count, na end) end else - iconName = iconName or "common_point" + iconName = iconName or "common_info_1" self.redPoint:setSprite(GConst.ATLAS_PATH.COMMON, iconName) self.redPoint:setAnchoredPosition(offsetX or 0, offsetY or 0) self.redPoint:setActive(true) diff --git a/lua/app/ui/arena/arena_season_reward_ui.lua b/lua/app/ui/arena/arena_season_reward_ui.lua index 442de0fb..724aab60 100644 --- a/lua/app/ui/arena/arena_season_reward_ui.lua +++ b/lua/app/ui/arena/arena_season_reward_ui.lua @@ -135,7 +135,7 @@ function ArenaSeasonRewardUI:showGetReward() end) end) - self.btnGet:addRedPoint(110, 35, 0.6) + self.btnGet:addRedPoint(110, 35, 1) local rewards = DataManager.ArenaData:getSeasonRewards(lastId) local rewardCount = #rewards diff --git a/lua/app/ui/arena/arena_ui.lua b/lua/app/ui/arena/arena_ui.lua index 11a44d2d..19d29ef6 100644 --- a/lua/app/ui/arena/arena_ui.lua +++ b/lua/app/ui/arena/arena_ui.lua @@ -236,7 +236,7 @@ function ArenaUI:refreshInfo() end if DataManager.ArenaData:hasSeasonReward() then - self.btnReward:addRedPoint(36, 25, 0.6) + self.btnReward:addRedPoint(36, 25, 1) else self.btnReward:removeRedPoint() end @@ -268,7 +268,7 @@ end -- 刷新段位奖励红点 function ArenaUI:refreshRedPoint() if DataManager.ArenaData:hasGradingRewardRedDot() then - self.btnGradingReward:addRedPoint(50, 50, 0.6) + self.btnGradingReward:addRedPoint(50, 50, 1) else self.btnGradingReward:removeRedPoint() end diff --git a/lua/app/ui/common/cell/hero_cell.lua b/lua/app/ui/common/cell/hero_cell.lua index 61fd1662..55151fe4 100644 --- a/lua/app/ui/common/cell/hero_cell.lua +++ b/lua/app/ui/common/cell/hero_cell.lua @@ -111,7 +111,7 @@ function HeroCell:refreshRedPoint() if not self.notShowRedPoint and DataManager.FormationData:heroInFormation(GConst.BattleConst.FORMATION_TYPE.STAGE, self.heroEntity:getCfgId()) then - self.selfNode:addRedPoint(55, -35, 0.64) + self.selfNode:addRedPoint(55, -35, 1) else self.selfNode:removeRedPoint() end diff --git a/lua/app/ui/common/cell/player_head_cell.lua b/lua/app/ui/common/cell/player_head_cell.lua index 557088dd..e5c857e9 100644 --- a/lua/app/ui/common/cell/player_head_cell.lua +++ b/lua/app/ui/common/cell/player_head_cell.lua @@ -39,7 +39,7 @@ function PlayerHeadCell:refresh(avatarId, frameId, showRp) -- 红点 if showRp and (DataManager.PlayerData:hasNewAvatar() or DataManager.PlayerData:hasNewFrame()) then - self.baseObject:addRedPoint(50, 50, 0.7) + self.baseObject:addRedPoint(50, 50, 1) else self.baseObject:removeRedPoint() end diff --git a/lua/app/ui/common/component/hero_formation_comp.lua b/lua/app/ui/common/component/hero_formation_comp.lua index 0edf4b7f..6e6a6dc4 100644 --- a/lua/app/ui/common/component/hero_formation_comp.lua +++ b/lua/app/ui/common/component/hero_formation_comp.lua @@ -21,7 +21,7 @@ function HeroFormationComp:refresh() if formation[i] then local heroEntity = DataManager.HeroData:getHeroById(formation[i]) if heroEntity then - heroCell:setVisible(true, 0.66) + heroCell:setVisible(true, 0.6) heroCell:refresh(heroEntity) heroCell:addClickListener(function() ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId()) @@ -40,7 +40,7 @@ function HeroFormationComp:refreshByFormation(formation) if formation[i] then local heroEntity = DataManager.HeroData:getHeroById(formation[i]) if heroEntity then - heroCell:setVisible(true, 0.66) + heroCell:setVisible(true, 0.6) heroCell:refresh(heroEntity) heroCell:addClickListener(function() ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId()) @@ -58,7 +58,7 @@ function HeroFormationComp:refreshByEntitys(formation) for i, heroCell in ipairs(self.heroCells) do local heroEntity = formation[i] if heroEntity then - heroCell:setVisible(true, 0.66) + heroCell:setVisible(true, 0.6) heroCell:refreshBriefInfo(heroEntity) heroCell:addClickListener(function() ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId(), true, heroEntity) diff --git a/lua/app/ui/daily_challenge/daily_challenge_ui.lua b/lua/app/ui/daily_challenge/daily_challenge_ui.lua index a462faae..05c24a20 100644 --- a/lua/app/ui/daily_challenge/daily_challenge_ui.lua +++ b/lua/app/ui/daily_challenge/daily_challenge_ui.lua @@ -81,7 +81,7 @@ function DailyChallengeUI:refreshTask() local taskObj = self.tasks[i] if DataManager.DailyChallengeData:canClaimTask(i) then -- 任务奖励可领取 - taskObj:addRedPoint(30, 30, 0.6) + taskObj:addRedPoint(30, 30, 1) taskObj:setSprite(GConst.ATLAS_PATH.DAILY_CHALLENGE, "daily_task_1") else -- 任务奖励不可领取 diff --git a/lua/app/ui/hero/hero_detail_ui.lua b/lua/app/ui/hero/hero_detail_ui.lua index 242ed645..635bac15 100644 --- a/lua/app/ui/hero/hero_detail_ui.lua +++ b/lua/app/ui/hero/hero_detail_ui.lua @@ -74,10 +74,12 @@ function HeroDetailUI:onLoadRootComplete() self.pageBtns = {} self.pageBtnTxs = {} self.pageBtnLocks = {} + self.pageRedImgs = {} for i = 1, 2 do self.pageBtns[i] = uiMap["hero_detail_ui.common.btns.page_btn_" .. i] self.pageBtnTxs[i] = uiMap["hero_detail_ui.common.btns.page_btn_" .. i .. ".text"] self.pageBtnLocks[i] = uiMap["hero_detail_ui.common.btns.page_btn_" .. i .. ".lock_img"] + self.pageRedImgs[i] = uiMap["hero_detail_ui.red_node.red_img_" .. i] if self.pageBtnLocks[i] then self.pageBtnLocks[i]:setActive(not self:getIsOpen(i)) end @@ -128,28 +130,26 @@ function HeroDetailUI:onLoadRootComplete() self:onRefresh() end) self:bind(DataManager.BagData.ItemData, "dirty", function() - self:refreshRedPoint() + self:refreshPageBtn() end) self:addEventListener(EventManager.CUSTOM_EVENT.HERO_UPGRADE_SUCCESS, function(id) - self:refreshRedPoint() + self:refreshPageBtn() end) self:addEventListener(EventManager.CUSTOM_EVENT.EQUIP_UPSECTION_SUCCESS, function(part) - Logger.logHighlight("升段:"..part) if part == GConst.EquipConst.PART_TYPE.STAR then self.compStar:playEffect(true, true) else self.compSkin:playUpgradeEffect(part) end - self:refreshRedPoint() + self:refreshPageBtn() end) self:addEventListener(EventManager.CUSTOM_EVENT.EQUIP_UPGRADE_SUCCESS, function(part) - Logger.logHighlight("升级:"..part) if part == GConst.EquipConst.PART_TYPE.STAR then self.compStar:playEffect(true, false) else self.compSkin:playUpgradeEffect(part) end - self:refreshRedPoint() + self:refreshPageBtn() end) self:addEventListener(EventManager.CUSTOM_EVENT.GO_DUNGEON_UI, function() self:closeUI() @@ -223,6 +223,11 @@ function HeroDetailUI:refreshPageInfo() elseif self.page == GConst.HeroConst.PANEL_TYPE.SKIN then self:showskinInfo() end + self:refreshPageBtn() +end + +-- 刷新标签红点 +function HeroDetailUI:refreshPageBtn() if self.onlyLook then -- 仅查看的不显示升级和激活按钮 self.leftBtn:setActive(false) self.rightBtn:setActive(false) @@ -241,30 +246,11 @@ function HeroDetailUI:refreshPageInfo() self.pageBtns[i]:setSprite(GConst.ATLAS_PATH.COMMON, "common_tab_2") self.pageBtnTxs[i]:setText("" .. self.btnTxs[i] .. "") end + self.pageRedImgs[i]:setActive(self.heroEntity:showRedPoint(i)) end - self:refreshRedPoint() end end --- 刷新标签红点 -function HeroDetailUI:refreshRedPoint() - -- if self.heroEntity:canLvUp() then - -- self.btnHero:addRedPoint(-55, 0, 0.6) - -- else - -- self.btnHero:removeRedPoint() - -- end - -- if DataManager.EquipData:canUpgradeStar(self.heroEntity:getCfgId()) then - -- self.btnStar:addRedPoint(-55, 0, 0.6) - -- else - -- self.btnStar:removeRedPoint() - -- end - -- if DataManager.EquipData:canUpgradeSkin(self.heroEntity:getCfgId()) then - -- self.btnSkin:addRedPoint(-55, 0, 0.6) - -- else - -- self.btnSkin:removeRedPoint() - -- end -end - function HeroDetailUI:showHeroInfo() self.heroInfo:setActive(true) -- self.selectHero:setActive(true) diff --git a/lua/app/ui/hero/hero_info_comp.lua b/lua/app/ui/hero/hero_info_comp.lua index 3034dc61..fdab4216 100644 --- a/lua/app/ui/hero/hero_info_comp.lua +++ b/lua/app/ui/hero/hero_info_comp.lua @@ -224,16 +224,22 @@ function HeroInfoComp:refresh(checkLevel) local costs = {} costs[1] = {id = self.heroEntity:getFragmentId(), num = materials[1], type = 1} costs[2] = {id = self.heroEntity:getLvUpCostId(), num = materials[2], type = 1} + local hadNums = {DataManager.BagData.ItemData:getItemNumById(costs[1].id), DataManager.BagData.ItemData:getItemNumById(costs[2].id)} for i,v in ipairs(self.costCells) do v:setActive(true) v:refreshByConfig(costs[i]) + if hadNums[i] >= costs[i].num then + v:setNumTx(hadNums[i] .. "/" .. costs[i].num) + else + v:setNumTx("" .. hadNums[i] .. "" .. "/" .. costs[i].num) + end end if canLvUp then self.btnUp:setTouchEnable(true) self.btnUp5:setTouchEnable(true) - self.btnUp:addRedPoint(70, 30, 0.6) - self.btnUp5:addRedPoint(70, 30, 0.6) + self.btnUp:addRedPoint(70, 30, 1) + self.btnUp5:addRedPoint(70, 30, 1) self.btnUp:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1]) self.btnUp5:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[2]) else @@ -263,7 +269,6 @@ function HeroInfoComp:refresh(checkLevel) if skillInfo then local skillId = skillInfo[2] local cfg = ConfigManager:getConfig("skill_rogue")[skillId] - Logger.logHighlight("================= isUnlock = %s", isUnlock) ModuleManager.HeroManager:showHeroSkillInfoUI(self.heroEntity, skillIdx, cfg.buff_id, isUnlock) end end diff --git a/lua/app/ui/idle/idle_drop_ui.lua b/lua/app/ui/idle/idle_drop_ui.lua index 1f937ba7..d0245104 100644 --- a/lua/app/ui/idle/idle_drop_ui.lua +++ b/lua/app/ui/idle/idle_drop_ui.lua @@ -279,7 +279,7 @@ function IdleDropUI:refreshBtns() else self.adBtn:setTouchEnable(true) self.adBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_orange_1") - self.adBtn:addRedPoint(60, 30, 0.5) + self.adBtn:addRedPoint(60, 30, 1) end end @@ -316,7 +316,7 @@ function IdleDropUI:addGetBtnRedPoint() return end self.getBtnRedPoint = true - self.getBtn:addRedPoint(70, 30, 0.5) + self.getBtn:addRedPoint(70, 30, 1) end function IdleDropUI:removeGetBtnRedPoint() @@ -332,7 +332,7 @@ function IdleDropUI:addQuickBtnRedPoint() return end self.quickBtnRedPoint = true - self.quickBtn:addRedPoint(90, 30, 0.5) + self.quickBtn:addRedPoint(90, 30, 1) end function IdleDropUI:removeQuickBtnRedPoint() diff --git a/lua/app/ui/main_city/component/arena_comp.lua b/lua/app/ui/main_city/component/arena_comp.lua index 60fad987..e4050619 100644 --- a/lua/app/ui/main_city/component/arena_comp.lua +++ b/lua/app/ui/main_city/component/arena_comp.lua @@ -168,7 +168,7 @@ function ArenaComp:refreshShow() end if DataManager.ArenaData:hasSeasonReward() then - self.btnReward:addRedPoint(30, 25, 0.6) + self.btnReward:addRedPoint(30, 25, 1) else self.btnReward:removeRedPoint() end @@ -263,7 +263,7 @@ end -- 刷新段位奖励红点 function ArenaComp:refreshGradingRewardRedPoint() if DataManager.ArenaData:hasGradingRewardRedDot() then - self.btnGradingReward:addRedPoint(50, 50, 0.6) + self.btnGradingReward:addRedPoint(50, 50, 1) else self.btnGradingReward:removeRedPoint() end diff --git a/lua/app/ui/main_city/component/main_comp.lua b/lua/app/ui/main_city/component/main_comp.lua index ab431a54..7f34ca1f 100644 --- a/lua/app/ui/main_city/component/main_comp.lua +++ b/lua/app/ui/main_city/component/main_comp.lua @@ -283,19 +283,19 @@ function MainComp:refreshRedPoint() local time = Time:getServerTime() - DataManager.IdleData:getLastDropTime() local idleMaxTime = DataManager.IdleData:getIdleMaxTime() if time >= idleMaxTime or DataManager.IdleData:getQuickIdleRemainTimes() > 0 then - self.leftBtn:addRedPoint(70, 20, 0.5) + self.leftBtn:addRedPoint(70, 20, 1) else self.leftBtn:removeRedPoint() end if DataManager.SummonData:hasSummonCostRedPoint() then - self.rightBtn:addRedPoint(-70, 20, 0.5) + self.rightBtn:addRedPoint(-70, 20, 1) else self.rightBtn:removeRedPoint() end if DataManager.ArenaData:hasEntranceRedDot() then - self.arenaBtn:addRedPoint(70, 26, 0.5) + self.arenaBtn:addRedPoint(70, 26, 1) else self.arenaBtn:removeRedPoint() end diff --git a/lua/app/ui/main_city/main_city_ui.lua b/lua/app/ui/main_city/main_city_ui.lua index f218e2ad..a4d11f04 100644 --- a/lua/app/ui/main_city/main_city_ui.lua +++ b/lua/app/ui/main_city/main_city_ui.lua @@ -826,7 +826,7 @@ function MainCityUI:refreshTask() self.taskBtn:setVisible(true) local showRedPoint = DataManager.DailyTaskData:showRedPoint() if showRedPoint then - self.taskBtn:addRedPoint(32, 28, 0.5) + self.taskBtn:addRedPoint(32, 28, 1) else self.taskBtn:removeRedPoint() end @@ -976,7 +976,7 @@ function MainCityUI:setLeftSideBarArrowRedPoint(isShow) end if isShow then if ModuleManager.MaincityManager:getIsMainCityLeftSideBarClose() then - self.leftArrowBtn:addRedPoint(19, 10, 0.6) + self.leftArrowBtn:addRedPoint(19, 10, 1) else self.leftArrowBtn:removeRedPoint() end @@ -991,7 +991,7 @@ function MainCityUI:setRightSideBarArrowRedPoint(isShow) end if isShow then if ModuleManager.MaincityManager:getIsMainCityRightSideBarClose() then - self.rightArrowBtn:addRedPoint(19, 10, 0.6) + self.rightArrowBtn:addRedPoint(19, 10, 1) else self.rightArrowBtn:removeRedPoint() end @@ -1017,13 +1017,13 @@ function MainCityUI:refreshBottomRp() local uiMap = self.root:genAllChildren() local heroRpObj = uiMap["main_ui.bottom_node.icons.ui_spine_obj_2.rp_node"] if DataManager.HeroData:getRp() then - heroRpObj:addRedPoint(0, 0, 0.7) + heroRpObj:addRedPoint(0, 0, 1) else heroRpObj:removeRedPoint() end local shopRpObj = uiMap["main_ui.bottom_node.icons.ui_spine_obj_3.rp_node"] if DataManager.ShopData:getRp() then - shopRpObj:addRedPoint(0, 0, 0.7) + shopRpObj:addRedPoint(0, 0, 1) else shopRpObj:removeRedPoint() end @@ -1031,7 +1031,7 @@ end function MainCityUI:refreshSettingBtn() if (DataManager.MailData:getIsOpen() and DataManager.MailData:getRedPoint()) or DataManager.AIHelperData:getRp() then - self.settingbtn:addRedPoint(40, 40, 0.7) + self.settingbtn:addRedPoint(40, 40, 1) else self.settingbtn:removeRedPoint() end diff --git a/lua/app/ui/player_info/avatar_cell.lua b/lua/app/ui/player_info/avatar_cell.lua index 0ea61ce0..8cd6e5d3 100644 --- a/lua/app/ui/player_info/avatar_cell.lua +++ b/lua/app/ui/player_info/avatar_cell.lua @@ -21,7 +21,7 @@ function AvatarCell:refresh(id, isSelect) -- 红点 if DataManager.PlayerData:isNewAvatar(self.id) then - self.baseObject:addRedPoint(45, 45, 0.6) + self.baseObject:addRedPoint(45, 45, 1) else self.baseObject:removeRedPoint() end diff --git a/lua/app/ui/player_info/frame_cell.lua b/lua/app/ui/player_info/frame_cell.lua index d2393337..6ab3c4dc 100644 --- a/lua/app/ui/player_info/frame_cell.lua +++ b/lua/app/ui/player_info/frame_cell.lua @@ -21,7 +21,7 @@ function FrameCell:refresh(id, isSelect) -- 红点 if DataManager.PlayerData:isNewFrame(self.id) then - self.baseObject:addRedPoint(45, 45, 0.6) + self.baseObject:addRedPoint(45, 45, 1) else self.baseObject:removeRedPoint() end diff --git a/lua/app/ui/player_info/player_info_ui.lua b/lua/app/ui/player_info/player_info_ui.lua index c68b8757..19f41f71 100644 --- a/lua/app/ui/player_info/player_info_ui.lua +++ b/lua/app/ui/player_info/player_info_ui.lua @@ -125,12 +125,12 @@ function PlayerInfoUI:onRefresh() -- 红点 if DataManager.PlayerData:hasNewAvatar() then - self.tagAvatar:addRedPoint(120, 20, 0.6) + self.tagAvatar:addRedPoint(120, 20, 1) else self.tagAvatar:removeRedPoint() end if DataManager.PlayerData:hasNewFrame() then - self.tagFrame:addRedPoint(120, 20, 0.6) + self.tagFrame:addRedPoint(120, 20, 1) else self.tagFrame:removeRedPoint() end diff --git a/lua/app/ui/summon/summon_main_ui.lua b/lua/app/ui/summon/summon_main_ui.lua index fade3c95..a514c73b 100755 --- a/lua/app/ui/summon/summon_main_ui.lua +++ b/lua/app/ui/summon/summon_main_ui.lua @@ -281,7 +281,7 @@ function SummonMainUI:refreshSummonBtn() if freeCount <= 0 then if hadNum >= 1 then self.txNumOne:setText(1) - self.btnSummonOne:addRedPoint(124, 32, 0.6) + self.btnSummonOne:addRedPoint(124, 32, 1) self.imgSummonOneIcon:setSprite(ModuleManager.ItemManager:getItemIcon(costId)) else self.btnSummonOne:removeRedPoint() @@ -300,7 +300,7 @@ function SummonMainUI:refreshSummonBtn() if hadNum >= 10 then self.txNumTen:setText(10) self.imgSummonTenIcon:setSprite(ModuleManager.ItemManager:getItemIcon(costId)) - self.btnSummonTen:addRedPoint(124, 32, 0.6) + self.btnSummonTen:addRedPoint(124, 32, 1) else self.btnSummonTen:removeRedPoint() local cost = DataManager.SummonData:getSummonGemCost(self.page) diff --git a/lua/app/ui/summon/summon_reward_ui.lua b/lua/app/ui/summon/summon_reward_ui.lua index cd036585..a83fa950 100755 --- a/lua/app/ui/summon/summon_reward_ui.lua +++ b/lua/app/ui/summon/summon_reward_ui.lua @@ -114,7 +114,7 @@ function SummonRewardUI:refreshSummonBtn() if freeCount <= 0 then if count >= 1 then self.txNumOne:setText(1) - self.btnSummonOne:addRedPoint(100, 30, 0.6) + self.btnSummonOne:addRedPoint(100, 30, 1) else self.btnSummonOne:removeRedPoint() if cost then @@ -135,7 +135,7 @@ function SummonRewardUI:refreshSummonBtn() obj = DataManager.BagData.ItemData:getItemById(costId) if count >= 10 then self.txNumTen:setText(10) - self.btnSummonTen:addRedPoint(100, 30, 0.6) + self.btnSummonTen:addRedPoint(100, 30, 1) else self.btnSummonTen:removeRedPoint() if cost then @@ -223,7 +223,7 @@ function SummonRewardUI:doUITweenShake(delayTime) if self.shakeSeq then self.shakeSeq:Kill() end - local duration = 0.6 -- 震动持续时间(秒) + local duration = 1 -- 震动持续时间(秒) local strength = BF.Vector2(20, 20) -- 震动强度 local vibrato = 60 -- 震动频率 local randomness = 90 -- 震动随机性 diff --git a/lua/app/userdata/hero/hero_entity.lua b/lua/app/userdata/hero/hero_entity.lua index 41173d94..13cb7174 100644 --- a/lua/app/userdata/hero/hero_entity.lua +++ b/lua/app/userdata/hero/hero_entity.lua @@ -765,4 +765,13 @@ function HeroEntity:_getAttrPower() end --@endregion +--@region 红点 +function HeroEntity:showRedPoint(page) + if page == GConst.HeroConst.PANEL_TYPE.HERO then + return self:canLvUp() + elseif page == GConst.HeroConst.PANEL_TYPE.STAR then + return self:canStarUp() + end +end +--@endregion return HeroEntity \ No newline at end of file