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