From c068622521d9a14bb68a21696e52915a798c56bf Mon Sep 17 00:00:00 2001 From: chenxi Date: Thu, 20 Apr 2023 23:08:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=98=E6=96=97=E5=8A=A0=E9=80=9F=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/battle/component/battle_unit_comp.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lua/app/module/battle/component/battle_unit_comp.lua b/lua/app/module/battle/component/battle_unit_comp.lua index e48f5ff2..46e5da17 100644 --- a/lua/app/module/battle/component/battle_unit_comp.lua +++ b/lua/app/module/battle/component/battle_unit_comp.lua @@ -618,7 +618,6 @@ function BattleUnitComp:enterAssistingAttackState() self.currAttackDuration = self:getAnimationDuration(attackName) self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName) self:playAnimation(attackName, false, false) - self:attackAndSpeedUp() self:initPosition() end @@ -674,13 +673,13 @@ function BattleUnitComp:enterSkillAttackState() local attackName if self.normalSkillCount > 0 then attackName = skill:getRandomNormalAttackName() + self:attackAndSpeedUp() else attackName = skill:getSkillAttackName() end self.currAttackDuration = self:getAnimationDuration(attackName) self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName) self:playAnimation(attackName, false, false) - self:attackAndSpeedUp() end end @@ -834,7 +833,7 @@ function BattleUnitComp:doNextSkillAttack() self.currAttackDuration = self:getAnimationDuration(attackName) self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName) self:playAnimation(attackName, false, false) - self:attackAndSpeedUp() + DataManager.BattleData:resetTimeSpeed() end function BattleUnitComp:doNextNormalAttack() @@ -853,14 +852,19 @@ function BattleUnitComp:doNextAttack() if self.normalSkillCount > 0 then local skill = self.unitEntity:getNormalSkill() attackName = skill:getRandomNormalAttackName() + if attackName then + self:attackAndSpeedUp() + end elseif self.currActiveSkill then attackName = self.currActiveSkill:getSkillAttackName() + if attackName then + DataManager.BattleData:resetTimeSpeed() + end end if attackName then self.currAttackDuration = self:getAnimationDuration(attackName) self.currAttackKeyTime = self:getAnimationKeyFrameTime(attackName) self:playAnimation(attackName, false, false) - self:attackAndSpeedUp() else -- 归位 self:moveBackToInitPosition() end