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