连击提示

This commit is contained in:
xiekaidong 2023-07-05 11:22:46 +08:00
parent d4237d18b9
commit afd2c11ef1
4 changed files with 23 additions and 5 deletions

View File

@ -44,6 +44,9 @@ BattleConst.ANIMATOR_HASH_NAME_NUMBER_BUFF = 1364146828
BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_1 = 123402348
BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_2 = -1638684202
BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_3 = -380331712
BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_1_l = 1120937928
BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_2_l = 1083611537
BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_3_l = 1096086438
BattleConst.UNLOCK_SKILL_ROGUE_TYPE = 6
BattleConst.RECOVER_HP_COUNT = 3
BattleConst.RECOVER_HP_INTERVAL = 0.2

View File

@ -83,6 +83,7 @@ end
function BattleBaseUI:initComboNode()
self.comboNode = nil
self.comboBg = nil
self.comboBg1 = nil
self.comboTx1 = nil
self.comboTx2 = nil
@ -836,11 +837,11 @@ function BattleBaseUI:showCombo(count, side)
if side == SIDE_ATK then
self.comboNode:setAnchorMin(1, 0.5)
self.comboNode:setAnchorMax(1, 0.5)
self.comboNode:setLocalEulerAngles(0, 0, 0)
self.comboBg:setLocalEulerAngles(0, 0, 0)
else
self.comboNode:setAnchorMin(0, 0.5)
self.comboNode:setAnchorMax(0, 0.5)
self.comboNode:setLocalEulerAngles(0, 180, 0)
self.comboBg:setLocalEulerAngles(0, 180, 0)
end
if count > 99 then
@ -865,7 +866,11 @@ function BattleBaseUI:showCombo(count, side)
self.comboTx1:setText(GConst.INT_TO_STRING[count], self.comboTxComp1)
self.comboTx1:setAnchoredPositionX(0)
self.comboTx2:setText(GConst.EMPTY_STRING, self.comboTxComp2)
self.comboAnimator:Play(GConst.BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_1, -1, 0)
if side == SIDE_ATK then
self.comboAnimator:Play(GConst.BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_1, -1, 0)
else
self.comboAnimator:Play(GConst.BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_1_l, -1, 0)
end
elseif count <= 10 then
if self.comboFxVisible1 then
self.comboFxVisible1 = false
@ -887,7 +892,11 @@ function BattleBaseUI:showCombo(count, side)
self.comboTx1:setAnchoredPositionX(0)
end
self.comboTx2:setText(GConst.EMPTY_STRING, self.comboTxComp2)
self.comboAnimator:Play(GConst.BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_2, -1, 0)
if side == SIDE_ATK then
self.comboAnimator:Play(GConst.BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_2, -1, 0)
else
self.comboAnimator:Play(GConst.BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_2_l, -1, 0)
end
else
if not self.comboFxVisible1 then
self.comboFxVisible1 = true
@ -904,7 +913,11 @@ function BattleBaseUI:showCombo(count, side)
self.comboBg1:setVisible(true)
self.comboTx1:setText(GConst.EMPTY_STRING, self.comboTxComp1)
self.comboTx2:setText(GConst.INT_TO_STRING[count], self.comboTxComp2)
self.comboAnimator:Play(GConst.BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_3, -1, 0)
if side == SIDE_ATK then
self.comboAnimator:Play(GConst.BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_3, -1, 0)
else
self.comboAnimator:Play(GConst.BattleConst.ANIMATOR_HASH_NAME_BATTLE_COMBO_3_l, -1, 0)
end
end
end

View File

@ -67,6 +67,7 @@ end
function BattleUI:initComboNode()
self.comboNode = self.uiMap["battle_ui.top_node.combo"]
self.comboBg = self.uiMap["battle_ui.top_node.combo.bg"]
self.comboBg1 = self.uiMap["battle_ui.top_node.combo.bg.bg_1"]
self.comboTx1 = self.uiMap["battle_ui.top_node.combo.number.text.text_1"]
self.comboTx2 = self.uiMap["battle_ui.top_node.combo.number.text.text_2"]

View File

@ -79,6 +79,7 @@ end
function BattleUIPVP:initComboNode()
self.comboNode = self.uiMap["battle_ui_pvp.battle_root.combo"]
self.comboBg = self.uiMap["battle_ui_pvp.battle_root.combo.bg"]
self.comboBg1 = self.uiMap["battle_ui_pvp.battle_root.combo.bg.bg_1"]
self.comboTx1 = self.uiMap["battle_ui_pvp.battle_root.combo.number.text.text_1"]
self.comboTx2 = self.uiMap["battle_ui_pvp.battle_root.combo.number.text.text_2"]