反击表现
This commit is contained in:
parent
4a67422ac8
commit
715408f15f
@ -554,10 +554,17 @@ function BattleTeam:onActionOver()
|
||||
self:getMainUnit().unitEntity:clearCounterAttackCount()
|
||||
|
||||
local teamAction = function()
|
||||
self.battleController.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ATK_STEP
|
||||
self.battleController.curTeam = self.battleController.atkTeam
|
||||
---- 普攻
|
||||
local skillMatch = self:getMainUnit().unitEntity:getMatchType()
|
||||
local skillMatch
|
||||
if self.side == BattleConst.SIDE_ATK then
|
||||
self.battleController.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ATK_STEP
|
||||
self.battleController.curTeam = self.battleController.atkTeam
|
||||
skillMatch = self:getMainUnit().unitEntity:getMatchType()
|
||||
else
|
||||
self.battleController.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_DEF_STEP
|
||||
self.battleController.curTeam = self.battleController.defTeam
|
||||
end
|
||||
|
||||
self:useNormalSkill(skillMatch, counterAttackCount, true, BattleConst.EFFECT_TYPE.COUNTERATTACK, function()
|
||||
self.battleController:enterNextTeamAction()
|
||||
end)
|
||||
|
||||
@ -530,16 +530,24 @@ end
|
||||
function BattleUI:initCounterAttack()
|
||||
self.counterAttackNode = self.uiMap["battle_ui.battle_root.battle_number_node.counter_attack"]
|
||||
self.counterTx = self.uiMap["battle_ui.battle_root.battle_number_node.counter_attack.text_number"]
|
||||
self.counterTxTmp = self.counterTx:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO)
|
||||
self.counterTxbgComp = self.uiMap["battle_ui.battle_root.top_node.counter_attack.bg"]
|
||||
self.counterAttackNode:setVisible(false)
|
||||
end
|
||||
|
||||
function BattleUI:showCounterAttack(count, side)
|
||||
local x = 280
|
||||
local horizontal = 180
|
||||
if side == GConst.BattleConst.SIDE_ATK then
|
||||
x = -280
|
||||
horizontal = 0
|
||||
self.counterTxTmp.alignment = CS.TMPro.TextAlignmentOptions.MidlineLeft
|
||||
else
|
||||
self.counterTxTmp.alignment = CS.TMPro.TextAlignmentOptions.MidlineRight
|
||||
end
|
||||
self.counterTxbgComp:setEulerAngles(0, horizontal, 0)
|
||||
self.counterAttackNode:setAnchoredPositionX(x)
|
||||
self.counterTx:setText(I18N:getGlobalText(I18N.GlobalConst.COUNTER_ATTACK_DESC) .. "+" .. count)
|
||||
self.counterTx:setText(I18N:getGlobalText(I18N.GlobalConst.COUNTER_ATTACK_DESC) .. "x" .. count)
|
||||
self.counterAttackNode:setVisible(true)
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user