This commit is contained in:
xiekaidong 2023-04-26 21:46:39 +08:00
commit 0a68394c62
2 changed files with 13 additions and 0 deletions

View File

@ -38,6 +38,9 @@ BattleConst.ANIMATOR_HASH_NAME_NUMBER_MOVE_L = -526518883
BattleConst.ANIMATOR_HASH_NAME_NUMBER_MOVE_R = 445827326
BattleConst.ANIMATOR_HASH_NAME_NUMBER_CRIT = -1734531349
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.UNLOCK_SKILL_ROGUE_TYPE = 6
BattleConst.RECOVER_HP_COUNT = 3
BattleConst.RECOVER_HP_INTERVAL = 0.2

View File

@ -382,6 +382,7 @@ end
function BattleUI:initComboNode()
self.comboNode = self.uiMap["battle_ui.top_node.combo"]
self.comboAnimator = self.comboNode:getComponent(GConst.TYPEOF_UNITY_CLASS.ANIMATOR)
self.comboNodeVisible = false
self.comboNode:setVisible(false)
self.comboBg1 = self.uiMap["battle_ui.top_node.combo.bg.bg_1"]
@ -418,19 +419,28 @@ function BattleUI:showCombo(count)
self.comboBg2:setVisible(false)
self.comboBg3:setVisible(false)
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)
elseif count <= 10 then
self.comboBg1:setVisible(false)
self.comboBg2:setVisible(true)
self.comboBg3:setVisible(false)
self.comboTx1:setText(GConst.INT_TO_STRING[count], self.comboTxComp1)
if count == 10 then
self.comboTx1:setAnchoredPositionX(-26)
else
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)
else
self.comboBg1:setVisible(false)
self.comboBg2:setVisible(false)
self.comboBg3: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)
end
end