伤害数字高度
This commit is contained in:
parent
1f44d96a32
commit
984b4e2b50
@ -82,6 +82,7 @@ function ConfigManager:preLoadConfig()
|
||||
if data then
|
||||
monsterFullData[k].model_id = data.model_id
|
||||
monsterFullData[k].hurt_num = data.hurt_num
|
||||
monsterFullData[k].body = data.body
|
||||
-- else
|
||||
-- Logger.logHighlight("not data monster_baseid = " .. v.monster_baseid)
|
||||
end
|
||||
|
||||
@ -72,6 +72,13 @@ BattleConst.TYPEOF_LUA_COMP = {
|
||||
BATTLE_NUMBER_COMPONENT = "app/module/battle/component/battle_number_comp",
|
||||
}
|
||||
|
||||
BattleConst.MIN_NODE_HEIGHT_DEFAULT = 69
|
||||
BattleConst.MIN_NODE_HEIGHT = {
|
||||
[1] = 34,
|
||||
[2] = 69,
|
||||
[3] = 160
|
||||
}
|
||||
|
||||
BattleConst.SKILL_MOVE_TYPE = {
|
||||
MOVE = 1, -- 移动到目标跟前使用
|
||||
STAND = 2, -- 原地使用
|
||||
|
||||
@ -1130,7 +1130,8 @@ function BattleUnitComp:takeDamageOrCure(atker, num, effectType, effectStatus)
|
||||
end
|
||||
|
||||
function BattleUnitComp:showEffectNumber(colorType, effectType, num, x, y)
|
||||
self.battleController:showEffectNumber(colorType, effectType, num, x, y)
|
||||
local addY = BattleConst.MIN_NODE_HEIGHT[self.unitEntity:getBody()] or BattleConst.MIN_NODE_HEIGHT_DEFAULT
|
||||
self.battleController:showEffectNumber(colorType, effectType, num, x, y + addY)
|
||||
end
|
||||
|
||||
function BattleUnitComp:playDead(callback)
|
||||
|
||||
@ -502,6 +502,7 @@ function BattleData:initHeroData()
|
||||
matchType = matchType,
|
||||
normalSkills = heroEntity:getHurtSkill(),
|
||||
assistingSkill = heroEntity:getAssistingSkill(),
|
||||
body = 2, -- 英雄默认是中体型
|
||||
attr = {
|
||||
hp = hp,
|
||||
max_hp = hp,
|
||||
@ -545,6 +546,7 @@ function BattleData:addMonster(monsterId, newTeam)
|
||||
assistingSkill = nil,
|
||||
isBoss = monsterInfo.is_boss,
|
||||
exp = monsterInfo.monster_exp or 0,
|
||||
body = monsterInfo.body,
|
||||
attr = {
|
||||
hp = hp,
|
||||
max_hp = hp,
|
||||
|
||||
@ -120,6 +120,10 @@ function BattleUnitEntity:getIsMainUnit()
|
||||
return self.isMainUnit
|
||||
end
|
||||
|
||||
function BattleUnitEntity:getBody()
|
||||
return self.unitData.body
|
||||
end
|
||||
|
||||
function BattleUnitEntity:getNormalSkill(reRandom)
|
||||
if self.normalSkills == nil then
|
||||
return nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user