Merge branch 'dev' of git.juzugame.com:b6-client/b6-lua into dev

This commit is contained in:
CloudJ 2023-05-24 14:33:47 +08:00
commit 9ac84611b4

View File

@ -230,7 +230,7 @@ function BattleUnitComp:stopRunAction()
end end
function BattleUnitComp:playAnimation(name, loop, forceRefresh) function BattleUnitComp:playAnimation(name, loop, forceRefresh)
if name == SPINE_ANIMATION_NAME.HIT or name == SPINE_ANIMATION_NAME.BLOCK then if name == self.curHurtName or name == SPINE_ANIMATION_NAME.BLOCK then
self.isPlayingSubAni = true self.isPlayingSubAni = true
end end
self.currAnimationName = name self.currAnimationName = name
@ -294,6 +294,9 @@ function BattleUnitComp:beforeAttack(actionState)
self.team:setCentralizedAttack(true) self.team:setCentralizedAttack(true)
self.battleController:setIsPauseHpProgress(true) self.battleController:setIsPauseHpProgress(true)
self.curAttackActionState = actionState self.curAttackActionState = actionState
if actionState == BattleConst.ATTACK_ACTION_STATE.NORMAL then
self:checkPassiveEvent(PASSIVE_EVENT.ON_UNI_ATTACK_START, self)
end
end end
function BattleUnitComp:useAssistingSkill(count, delay, callback) function BattleUnitComp:useAssistingSkill(count, delay, callback)
@ -679,7 +682,7 @@ function BattleUnitComp:updateIdleSubAni(...)
if not self.currAnimationName or not self.isPlayingSubAni then if not self.currAnimationName or not self.isPlayingSubAni then
return return
end end
if self.currAnimationName == SPINE_ANIMATION_NAME.HIT then if self.currAnimationName == self.curHurtName then
self:updateHurt(...) self:updateHurt(...)
elseif self.currAnimationName == SPINE_ANIMATION_NAME.BLOCK then elseif self.currAnimationName == SPINE_ANIMATION_NAME.BLOCK then
self:updateBlock(...) self:updateBlock(...)
@ -1535,7 +1538,15 @@ function BattleUnitComp:takeDamageOrCure(atker, num, effectType, effectStatus, d
end end
end end
elseif num > 0 then -- 治疗 elseif num > 0 then -- 治疗
self:showEffectNumber(BattleConst.EFFECT_COLOR_GREEN, BattleConst.EFFECT_TYPE_BUFF, "+" .. num, x, y, 0) local time = Time:getServerTime()
if self.lastHealTime == time then
self.lastSameTimeHealCount = self.lastSameTimeHealCount + 1
else
self.lastHealTime = time
self.lastSameTimeHealCount = 0
end
local delayTime = self.lastSameTimeHealCount * 0.1
self:showEffectNumber(BattleConst.EFFECT_COLOR_GREEN, BattleConst.EFFECT_TYPE_BUFF, "+" .. num, x, y, delayTime)
end end
local hpPercent = self.unitEntity:getHpPercent() local hpPercent = self.unitEntity:getHpPercent()
self.battleController:refreshHp(self.side, hp, hpPercent) self.battleController:refreshHp(self.side, hp, hpPercent)