This commit is contained in:
xiekaidong 2023-04-18 22:26:25 +08:00
commit 64b4a0962c
15 changed files with 4026 additions and 4093 deletions

View File

@ -182,6 +182,10 @@ local buff = {
}
},
[33]={
["name"]="heal_normal_attack",
["buff_type"]=1
},
[34]={
["name"]="stun",
["buff_type"]=8,
["icon"]="stun",
@ -189,60 +193,60 @@ local buff = {
4001
}
},
[34]={
[35]={
["name"]="shield",
["buff_type"]=2,
["fx_continued"]={
4001
}
},
[35]={
[36]={
["name"]="atkp_add",
["buff_type"]=1
},
[36]={
[37]={
["name"]="normal_attack_dec",
["buff_type"]=1,
["fx_continued"]={
4001
}
},
[37]={
[38]={
["name"]="normal_attack_add",
["buff_type"]=1,
["fx_continued"]={
4001
}
},
[38]={
[39]={
["name"]="block",
["buff_type"]=1
},
[39]={
[40]={
["name"]="hpp_add",
["buff_type"]=1
},
[40]={
[41]={
["name"]="crit_add",
["buff_type"]=1
},
[41]={
[42]={
["name"]="crit_time_add",
["buff_type"]=1
},
[42]={
[43]={
["name"]="exp_time_add",
["buff_type"]=7
},
[43]={
[44]={
["name"]="cured_add",
["buff_type"]=1
},
[44]={
[45]={
["name"]="add_skill",
["buff_type"]=7
},
[45]={
[46]={
["name"]="skill_fire_times",
["buff_type"]=7
}
@ -281,24 +285,25 @@ local keys = {
["atkp_purple_add"]=buff[30],
["wavehealp"]=buff[31],
["heal"]=buff[32],
["stun"]=buff[33],
["shield"]=buff[34],
["atkp_add"]=buff[35],
["normal_attack_dec"]=buff[36],
["normal_attack_add"]=buff[37],
["block"]=buff[38],
["hpp_add"]=buff[39],
["crit_add"]=buff[40],
["crit_time_add"]=buff[41],
["exp_time_add"]=buff[42],
["cured_add"]=buff[43],
["add_skill"]=buff[44],
["skill_fire_times"]=buff[45]
["heal_normal_attack"]=buff[33],
["stun"]=buff[34],
["shield"]=buff[35],
["atkp_add"]=buff[36],
["normal_attack_dec"]=buff[37],
["normal_attack_add"]=buff[38],
["block"]=buff[39],
["hpp_add"]=buff[40],
["crit_add"]=buff[41],
["crit_time_add"]=buff[42],
["exp_time_add"]=buff[43],
["cured_add"]=buff[44],
["add_skill"]=buff[45],
["skill_fire_times"]=buff[46]
}
}
local config = {
data=buff,
keys=keys,
count=45
count=46
}
return config

File diff suppressed because it is too large Load Diff

View File

@ -11,21 +11,21 @@ local hero = {
["rouge_skill_3"]=200503,
["begin_lv"]=1,
["hp"]={
1000000,
1100000,
1200000,
1300000,
1400000,
1500000,
1600000,
1700000,
1800000,
1900000,
2000000,
2100000,
2200000,
2300000,
2400000
2400000,
2500000,
2600000,
2700000,
2800000,
2900000,
3000000,
3100000,
3200000,
3300000,
3400000
},
["atk"]={
1000000,
@ -60,21 +60,21 @@ local hero = {
["rouge_skill_3"]=200203,
["begin_lv"]=1,
["hp"]={
1000000,
1100000,
1200000,
1300000,
1400000,
1500000,
1600000,
1700000,
1800000,
1900000,
2000000,
2100000,
2200000,
2300000,
2400000
2400000,
2500000,
2600000,
2700000,
2800000,
2900000,
3000000,
3100000,
3200000,
3300000,
3400000
},
["atk"]={
1000000,
@ -109,21 +109,21 @@ local hero = {
["rouge_skill_3"]=200703,
["begin_lv"]=3,
["hp"]={
1000000,
1100000,
1200000,
1300000,
1400000,
1500000,
1600000,
1700000,
1800000,
1900000,
2000000,
2100000,
2200000,
2300000,
2400000
2400000,
2500000,
2600000,
2700000,
2800000,
2900000,
3000000,
3100000,
3200000,
3300000,
3400000
},
["atk"]={
1000000,
@ -158,21 +158,21 @@ local hero = {
["rouge_skill_3"]=200103,
["begin_lv"]=1,
["hp"]={
1000000,
1100000,
1200000,
1300000,
1400000,
1500000,
1600000,
1700000,
1800000,
1900000,
2000000,
2100000,
2200000,
2300000,
2400000
2400000,
2500000,
2600000,
2700000,
2800000,
2900000,
3000000,
3100000,
3200000,
3300000,
3400000
},
["atk"]={
1000000,
@ -207,21 +207,21 @@ local hero = {
["rouge_skill_3"]=200603,
["begin_lv"]=3,
["hp"]={
1000000,
1100000,
1200000,
1300000,
1400000,
1500000,
1600000,
1700000,
1800000,
1900000,
2000000,
2100000,
2200000,
2300000,
2400000
2400000,
2500000,
2600000,
2700000,
2800000,
2900000,
3000000,
3100000,
3200000,
3300000,
3400000
},
["atk"]={
1000000,
@ -256,21 +256,21 @@ local hero = {
["rouge_skill_3"]=200303,
["begin_lv"]=1,
["hp"]={
1000000,
1100000,
1200000,
1300000,
1400000,
1500000,
1600000,
1700000,
1800000,
1900000,
2000000,
2100000,
2200000,
2300000,
2400000
2400000,
2500000,
2600000,
2700000,
2800000,
2900000,
3000000,
3100000,
3200000,
3300000,
3400000
},
["atk"]={
1000000,
@ -305,21 +305,21 @@ local hero = {
["rouge_skill_3"]=200803,
["begin_lv"]=3,
["hp"]={
1000000,
1100000,
1200000,
1300000,
1400000,
1500000,
1600000,
1700000,
1800000,
1900000,
2000000,
2100000,
2200000,
2300000,
2400000
2400000,
2500000,
2600000,
2700000,
2800000,
2900000,
3000000,
3100000,
3200000,
3300000,
3400000
},
["atk"]={
1000000,
@ -354,21 +354,21 @@ local hero = {
["rouge_skill_3"]=200403,
["begin_lv"]=1,
["hp"]={
1000000,
1100000,
1200000,
1300000,
1400000,
1500000,
1600000,
1700000,
1800000,
1900000,
2000000,
2100000,
2200000,
2300000,
2400000
2400000,
2500000,
2600000,
2700000,
2800000,
2900000,
3000000,
3100000,
3200000,
3300000,
3400000
},
["atk"]={
1000000,

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@ local skill = {
["round"]=0
}
},
["obj"]=2,
["skill_position"]=1
},
[2]={
@ -25,6 +26,7 @@ local skill = {
["round"]=0
}
},
["obj"]=2,
["skill_position"]=1
},
[3]={
@ -39,6 +41,7 @@ local skill = {
["round"]=0
}
},
["obj"]=2,
["skill_position"]=1
},
[4]={
@ -53,6 +56,7 @@ local skill = {
["round"]=0
}
},
["obj"]=2,
["skill_position"]=1
},
[5]={
@ -67,6 +71,7 @@ local skill = {
["round"]=0
}
},
["obj"]=2,
["skill_position"]=1
},
[6]={
@ -81,6 +86,7 @@ local skill = {
["round"]=0
}
},
["obj"]=2,
["skill_position"]=2
},
[7]={
@ -95,6 +101,7 @@ local skill = {
["round"]=0
}
},
["obj"]=2,
["skill_position"]=2
},
[8]={
@ -109,6 +116,7 @@ local skill = {
["round"]=0
}
},
["obj"]=2,
["skill_position"]=2
},
[9]={
@ -123,6 +131,7 @@ local skill = {
["round"]=0
}
},
["obj"]=2,
["skill_position"]=2
},
[10]={
@ -137,6 +146,7 @@ local skill = {
["round"]=0
}
},
["obj"]=2,
["skill_position"]=2
},
[11]={
@ -153,6 +163,7 @@ local skill = {
["round"]=0
}
},
["obj"]=1,
["skill_position"]=2
},
[12]={
@ -166,6 +177,7 @@ local skill = {
["round"]=0
}
},
["obj"]=1,
["skill_position"]=2
},
[13]={
@ -179,8 +191,22 @@ local skill = {
["round"]=1
}
},
["obj"]=2,
["skill_position"]=2
},
[14]={
["effect_type"]=2,
["trigger"]=3,
["effect"]={
{
["type"]="heal_normal_attack",
["num"]=500,
["ratio"]=10000,
["round"]=1
}
},
["obj"]=1
},
[320010]={
["position"]=3,
["effect_type"]=1,
@ -213,8 +239,7 @@ local skill = {
},
["icon"]=10,
["battle_icon"]="1",
["skill_position"]=1,
["name_act"]="skill01"
["skill_position"]=1
},
[220010]={
["position"]=2,
@ -321,8 +346,7 @@ local skill = {
},
["icon"]=30,
["battle_icon"]="3",
["skill_position"]=2,
["name_act"]="skill01"
["skill_position"]=2
},
[520010]={
["position"]=5,
@ -392,8 +416,7 @@ local skill = {
},
["icon"]=50,
["battle_icon"]="5",
["skill_position"]=2,
["name_act"]="skill01"
["skill_position"]=2
},
[330010]={
["position"]=3,
@ -1104,6 +1127,6 @@ local skill = {
}
}
local config = {
data=skill,count=63
data=skill,count=64
}
return config

View File

@ -743,11 +743,11 @@ local skill_rogue = {
["limit_times"]=1,
["weight"]=1000,
["qlt"]=4,
["type"]=9,
["type"]=12,
["skill_position"]=3,
["effect"]={
{
["type"]="skill_add",
["type"]="add_skill",
["num"]=13,
["ratio"]=10000,
["round"]=1
@ -788,7 +788,7 @@ local skill_rogue = {
["limit_times"]=1,
["weight"]=1000,
["qlt"]=4,
["type"]=9,
["type"]=12,
["skill_position"]=2,
["effect"]={
{
@ -963,8 +963,8 @@ local skill_rogue = {
["skill_position"]=3,
["effect"]={
{
["type"]="heal",
["num"]=500,
["type"]="add_skill",
["num"]=14,
["ratio"]=10000,
["round"]=1
}

View File

@ -1730,6 +1730,10 @@ function GFunc.getRewardType(reward)
end
end
function GFunc.DOBFSliderValue(slider, endValue, duration, snapping)
return CS.BF.Utils.DOBFSliderValue(slider, endValue, duration, snapping)
end
--[[
tabLe只速 Lua error
locaL readOnlyCfg = GFunc.readOnlyTab(cfg) return readOnlyCfg

View File

@ -243,16 +243,19 @@ function BattleUnitComp:useSkill(index, count, callback)
if self.normalSkillCount <= 0 then
self.actionOverCallback = nil
self.activeSkillIndex = nil
self.battleController:setIsPauseHpProgress(false)
callback()
return
end
if not self:changeState(UNIT_STATE.NORMAL_ATTACK) then
self.actionOverCallback = nil
self.battleController:setIsPauseHpProgress(false)
callback()
end
else
if not self:changeState(UNIT_STATE.SKILL_ATTACK) then
self.actionOverCallback = nil
self.battleController:setIsPauseHpProgress(false)
callback()
end
end
@ -274,16 +277,19 @@ function BattleUnitComp:useAllSkills(callback)
if self.currActiveSkill == nil then -- 没有技能就用普攻
if self.normalSkillCount <= 0 then
self.actionOverCallback = nil
self.battleController:setIsPauseHpProgress(false)
callback()
return
end
if not self:changeState(UNIT_STATE.NORMAL_ATTACK) then
self.actionOverCallback = nil
self.battleController:setIsPauseHpProgress(false)
callback()
end
else
if not self:changeState(UNIT_STATE.SKILL_ATTACK) then
self.actionOverCallback = nil
self.battleController:setIsPauseHpProgress(false)
callback()
end
end
@ -294,6 +300,7 @@ function BattleUnitComp:useNormalSkill(count, callback)
self.normalSkillCount = count + self.unitEntity:getNormalAttackAddCount()
if not self:changeState(UNIT_STATE.NORMAL_ATTACK) then
self.actionOverCallback = nil
self.battleController:setIsPauseHpProgress(false)
callback()
end
end
@ -634,12 +641,37 @@ function BattleUnitComp:updateSkillAttack(dt)
if self.normalSkillCount > 0 then
local skill = self.unitEntity:getNormalSkill()
self:onSkillTakeEffect(skill)
if self.normalSkillCount == 1 and self.currActiveSkill == nil then -- 最后一次攻击
self.battleController:setIsPauseHpProgress(false)
end
else
self:onSkillTakeEffect(self.currActiveSkill)
if not self:getIsHaveNextAvailableActiveSkill() then
self.battleController:setIsPauseHpProgress(false)
end
end
end
end
end
function BattleUnitComp:getIsHaveNextAvailableActiveSkill()
local skillCanUseTimes = self.currActiveSkill:getSkillCanUseTimes()
if skillCanUseTimes and skillCanUseTimes > 0 then -- 当前技能可以多次使用
return true
elseif self.activeSkillIndex then
local currActiveSkill = nil
local activeSkillIndex = self.activeSkillIndex + 1
local activeSkillCount = self.unitEntity:getActiveSkillCount()
while activeSkillIndex <= activeSkillCount do
currActiveSkill = self.unitEntity:getAvailableActiveSkill(activeSkillIndex)
if currActiveSkill then
return true
end
activeSkillIndex = activeSkillIndex + 1
end
end
return false
end
function BattleUnitComp:moveBackToInitPosition()
self.isMove = true
@ -763,6 +795,9 @@ function BattleUnitComp:updateNormalAttack(dt)
self.currAttackKeyTime = 0
local skill = self.unitEntity:getNormalSkill()
self:onSkillTakeEffect(skill)
if self.normalSkillCount == 1 then -- 如果是最后一次攻击,那么可以开始跑血条了
self.battleController:setIsPauseHpProgress(false)
end
end
end
end

View File

@ -155,9 +155,13 @@ end
function BattleController:initBattleTeam()
self.atkTeam = BattleTeam:create()
self.atkTeam:init(BattleConst.SIDE_ATK)
self.atkTeam:init(BattleConst.SIDE_ATK, self)
self.defTeam = BattleTeam:create()
self.defTeam:init(BattleConst.SIDE_DEF)
self.defTeam:init(BattleConst.SIDE_DEF, self)
end
function BattleController:setIsPauseHpProgress(value)
self.battleUI:setIsPauseHpProgress(value)
end
function BattleController:prepareFight()

View File

@ -61,14 +61,12 @@ end
function BattleHelper:getEffectText(parent)
if #self.battleEffectTextPool <= 0 then
local prefab = CS.UnityEngine.Object.Instantiate(self.effectTextCache:getGameObject(), parent:getTransform(), false)
local prefab = CS.UnityEngine.Object.Instantiate(self.effectTextCache:getGameObject())
local prefabObject = UIPrefabObject:create()
prefabObject:initWithPrefab(self.effectTextCache:getAssetPath(), prefab)
prefabObject:initPrefabHelper()
prefabObject:addUnloadCallback(function(obj)
ResourceManager:unload(obj:getAssetPath())
end)
prefabObject:getTransform():SetAsLastSibling()
prefabObject:setParent(parent, false)
local comp = prefabObject:addLuaComponent(GConst.BattleConst.TYPEOF_LUA_COMP.BATTLE_NUMBER_COMPONENT)
comp:setEnabled(true)
return comp

View File

@ -25,16 +25,16 @@ end
local function _checkhpLowerThan(unitComp, skill, targetComp, hpPercent)
local triggerValue = skill:getPassiveTriggerValue() or 0
if hpPercent*DEFAULT_FACTOR < triggerValue then -- 低于指定血量,触发技能
local data = skill:getRecordData(SKILL_RECORD_DATA_NAME.HP_LOWER_THAN) or 0
local data = unitComp.unitEntity:getTeamRecordData(SKILL_RECORD_DATA_NAME.HP_LOWER_THAN) or 0
if data == 1 then -- 已经触发过了
return 0
end
skill:setRecordData(SKILL_RECORD_DATA_NAME.HP_LOWER_THAN, 1)
unitComp.unitEntity:setTeamRecordData(SKILL_RECORD_DATA_NAME.HP_LOWER_THAN, 1)
return 1
else
local data = skill:getRecordData(SKILL_RECORD_DATA_NAME.HP_LOWER_THAN) or 0
local data = unitComp.unitEntity:getTeamRecordData(SKILL_RECORD_DATA_NAME.HP_LOWER_THAN) or 0
if data == 1 then -- 已经触发过了,那么需要取消
skill:setRecordData(SKILL_RECORD_DATA_NAME.HP_LOWER_THAN, 0)
unitComp.unitEntity:setTeamRecordData(SKILL_RECORD_DATA_NAME.HP_LOWER_THAN, 0)
return -1
end
end

View File

@ -2,8 +2,9 @@ local BattleBuffHandle = require "app/module/battle/helper/battle_buff_handle"
local BattleTeam = class("BattleTeam")
function BattleTeam:init(side)
function BattleTeam:init(side, battleController)
self.side = side
self.battleController = battleController
self.unitList = {}
self.unitMap = {}
self.buffList = {}
@ -53,6 +54,7 @@ function BattleTeam:useNormalSkill(matchType, count, callback)
return callback()
end
self.mainUnit = unit
self.battleController:setIsPauseHpProgress(true)
unit:beforeAttack()
unit:useNormalSkill(count, callback)
end
@ -68,6 +70,7 @@ function BattleTeam:useSkill(matchType, count, callback)
return callback()
end
self.mainUnit = unit
self.battleController:setIsPauseHpProgress(true)
unit:beforeAttack()
unit:useSkill(1, count, callback)
end
@ -94,6 +97,7 @@ function BattleTeam:useAssistingSkill(assistingList, callback)
end
function BattleTeam:mainUnitUseAllSkills(callback)
self.battleController:setIsPauseHpProgress(true)
self.mainUnit:beforeAttack()
self.mainUnit:useAllSkills(callback)
end

View File

@ -92,20 +92,149 @@ end
function BattleUI:initHpNode()
self.hpProgressLeft = self.uiMap["battle_ui.top_node.bg_l.atk_slider_green"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)
self.hpProgressRight = self.uiMap["battle_ui.top_node.bg_r.def_slider_red"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)
self.hpProgressLeft.value = 1
self.hpProgressRight.value = 1
self.hpProgressYellowLeft = self.uiMap["battle_ui.top_node.bg_l.atk_slider_yellow"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)
self.hpProgressYellowRight = self.uiMap["battle_ui.top_node.bg_r.def_slider_yellow"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)
self.hpProgressYellowLeft.value = 1
self.hpProgressYellowRight.value = 1
self.hpTextLeft = self.uiMap["battle_ui.top_node.atk_hp"]
self.hpTextRight = self.uiMap["battle_ui.top_node.def_hp"]
self.hpPercentLeft = 1
self.hpPercentRight = 1
end
function BattleUI:setIsPauseHpProgress(value)
if self.isPauseHpProgress == value then
return
end
self.isPauseHpProgress = value
if not value then
local timeLeft = math.abs(self.hpProgressYellowLeft.value - self.hpPercentLeft)
if timeLeft > 0.01 then
local delayTime = math.abs(self.hpProgressLeft.value - self.hpPercentLeft)*2
if delayTime > 0.05 then
if self.hpProgressYellowLeftSid then
self:unscheduleGlobal(self.hpProgressYellowLeftSid)
end
self.hpProgressYellowLeftSid = self:performWithDelayGlobal(function()
self:playHpProgressYellowRightTween(timeLeft)
end, delayTime)
else
self:playHpProgressYellowRightTween(timeLeft)
end
else
if self.hpProgressYellowLeftTween then
self.hpProgressYellowLeftTween:Pause()
end
self.hpProgressYellowLeft.value = self.hpPercentLeft
end
local timeRight = math.abs(self.hpProgressYellowRight.value - self.hpPercentRight)
if timeRight > 0.01 then
local delayTime = math.abs(self.hpProgressRight.value - self.hpPercentRight)*2
if delayTime > 0.05 then
if self.hpProgressYellowRightSid then
self:unscheduleGlobal(self.hpProgressYellowRightSid)
end
self.hpProgressYellowRightSid = self:performWithDelayGlobal(function()
self:playHpProgressYellowRightTween(delayTime)
end, delayTime)
else
self:playHpProgressYellowRightTween(delayTime)
end
else
if self.hpProgressYellowRightTween then
self.hpProgressYellowRightTween:Pause()
end
self.hpProgressYellowRight.value = self.hpPercentRight
end
end
end
function BattleUI:playHpProgressYellowLeftTween(time)
if self.hpProgressYellowLeftTween == nil then
self.hpProgressYellowLeftTween = GFunc.DOBFSliderValue(self.hpProgressYellowLeft, self.hpPercentLeft, time, false)
self.hpProgressYellowLeftTween:SetIntId(GConst.DOTWEEN_IDS.BATTLE)
self.hpProgressYellowLeftTween:SetAutoKill(false)
else
self.hpProgressYellowLeftTween:ChangeEndValue(self.hpPercentLeft, time, true)
self.hpProgressYellowLeftTween:Restart()
end
end
function BattleUI:playHpProgressYellowRightTween(time)
if self.hpProgressYellowRightTween == nil then
self.hpProgressYellowRightTween = GFunc.DOBFSliderValue(self.hpProgressYellowRight, self.hpPercentRight, time, false)
self.hpProgressYellowRightTween:SetIntId(GConst.DOTWEEN_IDS.BATTLE)
self.hpProgressYellowRightTween:SetAutoKill(false)
else
self.hpProgressYellowRightTween:ChangeEndValue(self.hpPercentRight, time, true)
self.hpProgressYellowRightTween:Restart()
end
end
function BattleUI:refreshAtkHp(num, percent)
self.hpTextLeft:setText(GFunc.num2Str(num))
if not self.isPauseHpProgress then
if self.hpProgressLeftTween then
self.hpProgressLeftTween:Pause()
end
if self.hpProgressYellowLeftTween then
self.hpProgressYellowLeftTween:Pause()
end
if self.hpProgressYellowLeftSid then
self:unscheduleGlobal(self.hpProgressYellowLeftSid)
self.hpProgressYellowLeftSid = nil
end
self.hpProgressLeft.value = percent
self.hpProgressYellowLeft.value = percent
return
end
if self.hpPercentLeft == percent then
return
end
self.hpPercentLeft = percent
local time = math.abs(self.hpProgressLeft.value - percent)*2
if self.hpProgressLeftTween == nil then
self.hpProgressLeftTween = GFunc.DOBFSliderValue(self.hpProgressLeft, percent, time, false)
self.hpProgressLeftTween:SetIntId(GConst.DOTWEEN_IDS.BATTLE)
self.hpProgressLeftTween:SetAutoKill(false)
else
self.hpProgressLeftTween:ChangeEndValue(percent, time, true)
self.hpProgressLeftTween:Restart()
end
end
function BattleUI:refreshDefHp(num, percent)
self.hpTextRight:setText(GFunc.num2Str(num))
if not self.isPauseHpProgress then
if self.hpProgressRightTween then
self.hpProgressRightTween:Pause()
end
if self.hpProgressYellowRightTween then
self.hpProgressYellowRightTween:Pause()
end
if self.hpProgressYellowRightSid then
self:unscheduleGlobal(self.hpProgressYellowRightSid)
self.hpProgressYellowRightSid = nil
end
self.hpProgressRight.value = percent
self.hpProgressYellowRight.value = percent
return
end
if self.hpPercentRight == percent then
return
end
self.hpPercentRight = percent
local time = math.abs(self.hpProgressRight.value - percent)*2
if self.hpProgressRightTween == nil then
self.hpProgressRightTween = GFunc.DOBFSliderValue(self.hpProgressRight, percent, time, false)
self.hpProgressRightTween:SetIntId(GConst.DOTWEEN_IDS.BATTLE)
self.hpProgressRightTween:SetAutoKill(false)
else
self.hpProgressRightTween:ChangeEndValue(percent, time, true)
self.hpProgressRightTween:Restart()
end
end
function BattleUI:refreshSkill(elementMap)
@ -545,6 +674,30 @@ function BattleUI:clear()
if self.battleNode then
self.battleNode:removeAllChildren()
end
if self.hpProgressYellowLeftSid then
self:unscheduleGlobal(self.hpProgressYellowLeftSid)
self.hpProgressYellowLeftSid = nil
end
if self.hpProgressYellowRightSid then
self:unscheduleGlobal(self.hpProgressYellowRightSid)
self.hpProgressYellowRightSid = nil
end
if self.hpProgressLeftTween then
self.hpProgressLeftTween:Kill()
self.hpProgressLeftTween = nil
end
if self.hpProgressYellowLeftTween then
self.hpProgressYellowLeftTween:Kill()
self.hpProgressYellowLeftTween = nil
end
if self.hpProgressRightTween then
self.hpProgressRightTween:Kill()
self.hpProgressRightTween = nil
end
if self.hpProgressYellowRightTween then
self.hpProgressYellowRightTween:Kill()
self.hpProgressYellowRightTween = nil
end
if self.battleNumberNode then
self.battleNumberNode:removeAllChildren()
end

View File

@ -229,11 +229,34 @@ function BattleTeamEntity:handleShield(damageNum)
end
end
function BattleTeamEntity:getRecordData(name)
if self.recordData == nil then
self.recordData = {}
end
return self.recordData[name]
end
function BattleTeamEntity:setRecordData(name, value)
if self.recordData == nil then
self.recordData = {}
end
self.recordData[name] = value
end
function BattleTeamEntity:clearRecordData()
if self.recordData then
for k, v in pairs(self.recordData) do
self.recordData[k] = nil
end
end
end
function BattleTeamEntity:die()
if self.isDead then
return
end
self.isDead = true
self:clearRecordData()
end
function BattleTeamEntity:getIsDead()

View File

@ -247,6 +247,14 @@ function BattleUnitEntity:getSkillExtraUseTimes(skillId)
return self.skillExtraUseTimes[skillId] or 0
end
function BattleUnitEntity:getTeamRecordData(name)
return self.team:getRecordData(name)
end
function BattleUnitEntity:setTeamRecordData(name, value)
self.team:setRecordData(name, value)
end
function BattleUnitEntity:onRoundEnd()
for k, v in ipairs(self.activeSkills) do
v:cooldown()