boss技能弹窗
This commit is contained in:
parent
08795a1bb4
commit
12ee9c73b4
@ -174,12 +174,11 @@ function TipsManager:showSkillTips(targetObj, buffIds, skillId)
|
||||
end
|
||||
|
||||
function TipsManager:showBattleSkillTips(targetObj, buffIds, skillId)
|
||||
local tarCornerScreenPos = self:getCornerScreenPosition(targetObj, TipsManager.ALIGN_TYPE.TOP_CENTER)
|
||||
local params = {
|
||||
tarCornerScreenPos = tarCornerScreenPos,
|
||||
buffNames = buffIds,
|
||||
skillId = skillId,
|
||||
}
|
||||
local params = {}
|
||||
local tarCornerScreenPos = self:getCornerScreenPosition(targetObj, TipsManager.ALIGN_TYPE.LEFT_CENTER)
|
||||
params.tarCornerScreenPos = tarCornerScreenPos
|
||||
params.buffNames = buffIds
|
||||
params.skillId = skillId
|
||||
UIManager:showUI("app/ui/tips/battle_skill_tips", params)
|
||||
end
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ function SkillTips:ctor(params)
|
||||
self.tarCornerScreenPos = params.tarCornerScreenPos
|
||||
self.buffNames = params.buffNames
|
||||
self.skillId = params.skillId
|
||||
self.location = self.skillId ~= nil and ModuleManager.TipsManager.ALIGN_TYPE.TOP_CENTER or ModuleManager.TipsManager.ALIGN_TYPE.BOTTOM_CENTER
|
||||
self.location = ModuleManager.TipsManager.ALIGN_TYPE.LEFT_CENTER
|
||||
end
|
||||
|
||||
function SkillTips:getPrefabPath()
|
||||
@ -31,8 +31,8 @@ function SkillTips:onLoadRootComplete()
|
||||
|
||||
self.content = uiMap["skill_tips.content"]
|
||||
self.bg = uiMap["skill_tips.content.bg"]
|
||||
self.imgArrow = uiMap["skill_tips.content.bg.img_arrow"]
|
||||
self.txDesc = uiMap["skill_tips.content.bg.tx_desc"]
|
||||
self.imgArrowRight = uiMap["skill_tips.content.bg.img_arrow_right"]
|
||||
self.skillList = {}
|
||||
for i = 1, 3 do
|
||||
table.insert(self.skillList, uiMap["skill_tips.content.bg.item_desc_" .. i])
|
||||
@ -57,7 +57,8 @@ function SkillTips:onRefresh()
|
||||
self:refreshSkillDesc()
|
||||
|
||||
if self.tarCornerScreenPos then
|
||||
self:locate(self.location, self.originSizeDelta, self.bg, self.tarCornerScreenPos)
|
||||
local pos = {x = self.tarCornerScreenPos.x - 17, y = self.tarCornerScreenPos.y}
|
||||
self:locate(self.location, self.originSizeDelta, self.bg, pos)
|
||||
end
|
||||
end
|
||||
|
||||
@ -79,7 +80,7 @@ function SkillTips:refreshSkillDesc()
|
||||
local iconSize = self.skillId ~= nil and ICON_SIZE_SKILL or ICON_SIZE_BUFF
|
||||
local buffWidth = self.skillId ~= nil and BUFF_TX_WIDTH_SKILL or BUFF_TX_WIDTH_BUFF
|
||||
self.bg:setSizeDeltaX(width)
|
||||
self.imgArrow:setActive(self.skillId ~= nil)
|
||||
self.imgArrowRight:setActive(self.skillId ~= nil)
|
||||
|
||||
-- Logger.logHighlight("显示buff:")
|
||||
-- Logger.printTable(self.buffNames)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user