2021-01-09 14:20:06 +08:00
|
|
|
|
BuffCtrl = {}
|
2020-11-01 15:46:48 +08:00
|
|
|
|
|
|
|
|
|
local BuffTypeToConfigType = {
|
|
|
|
|
[BuffName.PropertyChange] = 1,
|
|
|
|
|
[BuffName.Control] = 2,
|
|
|
|
|
[BuffName.DOT] = 3,
|
|
|
|
|
[BuffName.HOT] = 4,
|
|
|
|
|
[BuffName.Shield] = 5,
|
|
|
|
|
[BuffName.Immune] = 6,
|
|
|
|
|
[BuffName.Curse] = 7,
|
2020-12-30 14:29:06 +08:00
|
|
|
|
[BuffName.KylinMark] = 8,
|
|
|
|
|
[BuffName.Exile] = 9,
|
2020-11-01 15:46:48 +08:00
|
|
|
|
}
|
|
|
|
|
local function _GetPropChangeBuffCType(pName)
|
|
|
|
|
for cType, pn in ipairs(BattlePropList) do
|
|
|
|
|
if pn == pName then
|
|
|
|
|
return cType
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
local function _GetBuffEffectConfig(buff)
|
|
|
|
|
local bType = buff.type
|
|
|
|
|
local cType = 1
|
|
|
|
|
if bType == BuffName.PropertyChange then
|
|
|
|
|
cType = _GetPropChangeBuffCType(buff.propertyName)
|
|
|
|
|
elseif bType == BuffName.HOT then
|
|
|
|
|
cType = 1
|
|
|
|
|
elseif bType == BuffName.DOT then
|
|
|
|
|
cType = buff.damageType
|
|
|
|
|
elseif bType == BuffName.Brand then
|
|
|
|
|
cType = buff.flag
|
|
|
|
|
elseif bType == BuffName.Control then
|
|
|
|
|
cType = buff.ctrlType
|
|
|
|
|
elseif bType == BuffName.Shield then
|
|
|
|
|
cType = buff.shieldType
|
|
|
|
|
-- 无敌吸血盾特殊判断
|
|
|
|
|
if cType == ShieldTypeName.AllReduce and buff.shieldValue ~= 0 then
|
|
|
|
|
cType = 4
|
|
|
|
|
end
|
|
|
|
|
elseif bType == BuffName.Immune then
|
|
|
|
|
cType = buff.immuneType
|
|
|
|
|
elseif bType == BuffName.Curse then
|
|
|
|
|
cType = buff.curseType
|
2020-12-30 14:29:06 +08:00
|
|
|
|
elseif bType== BuffName.KylinMark then
|
|
|
|
|
cType = 1
|
|
|
|
|
elseif bType== BuffName.Exile then
|
|
|
|
|
cType = 1
|
2020-11-01 15:46:48 +08:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local type = BuffTypeToConfigType[bType]
|
|
|
|
|
local config = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.BuffEffectConfig, "Type", type, "CType", cType)
|
|
|
|
|
return config
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function BuffCtrl.New(unit, buffRoot)
|
|
|
|
|
local o = {}
|
|
|
|
|
setmetatable(o, {__index = BuffCtrl})
|
|
|
|
|
o:ctor(unit, buffRoot)
|
|
|
|
|
return o
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function BuffCtrl:ctor(unit, buffRoot)
|
2021-01-26 17:08:39 +08:00
|
|
|
|
-- LogPink("Buffctrl "..unit.camp.."|"..unit.role.position)
|
2020-11-01 15:46:48 +08:00
|
|
|
|
self.owner = unit
|
|
|
|
|
self.owner.role.Event:AddEvent(BattleEventName.BuffStart, self.OnBuffStart, self)
|
|
|
|
|
self.owner.role.Event:AddEvent(BattleEventName.BuffCover, self.OnBuffCover, self)
|
|
|
|
|
self.owner.role.Event:AddEvent(BattleEventName.BuffTrigger, self.OnBuffTrigger, self)
|
|
|
|
|
self.owner.role.Event:AddEvent(BattleEventName.BuffEnd, self.OnBuffEnd, self)
|
|
|
|
|
self.owner.role.Event:AddEvent(BattleEventName.BuffDodge, self.OnBuffDodge, self)
|
|
|
|
|
self.owner.role.Event:AddEvent(BattleEventName.BuffRoundChange, self.OnBuffRoundChange, self)
|
|
|
|
|
self.owner.role.Event:AddEvent(BattleEventName.BuffDurationChange, self.OnBuffRoundChange, self)
|
|
|
|
|
|
|
|
|
|
self.buffRoot = buffRoot
|
|
|
|
|
self.BuffIconList = {}
|
|
|
|
|
self.BuffEffectList = {}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function BuffCtrl:Update()
|
|
|
|
|
for k, v in pairs(self.BuffIconList) do
|
|
|
|
|
v:Update()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- 加载并播放动画
|
|
|
|
|
function BuffCtrl:AddBuffEffect(buffName, isTrigger, offset)
|
|
|
|
|
if not buffName or buffName == "" then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
if not self.BuffEffectList then
|
|
|
|
|
self.BuffEffectList = {}
|
|
|
|
|
end
|
|
|
|
|
if not self.BuffEffectList[buffName] then
|
|
|
|
|
self.BuffEffectList[buffName] = {}
|
|
|
|
|
self.BuffEffectList[buffName].node = nil
|
|
|
|
|
self.BuffEffectList[buffName].count = 0
|
|
|
|
|
end
|
|
|
|
|
--
|
|
|
|
|
if not self.BuffEffectList[buffName].node then
|
|
|
|
|
local sortingOrder
|
|
|
|
|
if self.owner.camp == 0 then
|
|
|
|
|
sortingOrder = self.owner.GameObject:GetComponent("Canvas").sortingOrder
|
|
|
|
|
end
|
|
|
|
|
local node = BattleManager.LoadAsset(buffName, sortingOrder)
|
|
|
|
|
-- node.transform:SetParent(self.RootPanel.transform)
|
|
|
|
|
-- node.transform.localScale = Vector3.one
|
|
|
|
|
node.transform:SetParent(self.owner.GameObject.transform)
|
|
|
|
|
node.transform.localScale = Vector3.one
|
|
|
|
|
node.transform.localPosition = offset and Vector3.New(offset[1], offset[2], 0) or Vector3.zero--self.GameObject.transform.localPosition
|
|
|
|
|
self.BuffEffectList[buffName].node = node
|
|
|
|
|
end
|
|
|
|
|
self.BuffEffectList[buffName].node:SetActive(false)
|
|
|
|
|
self.BuffEffectList[buffName].node:SetActive(true)
|
|
|
|
|
-- 触发特效不计数
|
|
|
|
|
if not isTrigger then
|
|
|
|
|
self.BuffEffectList[buffName].count = self.BuffEffectList[buffName].count + 1
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
-- 卸载动画
|
|
|
|
|
function BuffCtrl:RemoveBuffEffect(buffName)
|
|
|
|
|
if not buffName or buffName == "" then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
if not self.BuffEffectList then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
if not self.BuffEffectList[buffName] then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
if not self.BuffEffectList[buffName].node then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
-- 节点存在,数量不存在直接回收
|
|
|
|
|
if not self.BuffEffectList[buffName].count then
|
|
|
|
|
poolManager:UnLoadAsset(buffName, self.BuffEffectList[buffName].node, PoolManager.AssetType.GameObject)
|
|
|
|
|
self.BuffEffectList[buffName] = nil
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
-- 引用数量减1
|
|
|
|
|
self.BuffEffectList[buffName].count = self.BuffEffectList[buffName].count - 1
|
|
|
|
|
if self.BuffEffectList[buffName].count <= 0 then
|
|
|
|
|
poolManager:UnLoadAsset(buffName, self.BuffEffectList[buffName].node, PoolManager.AssetType.GameObject)
|
|
|
|
|
self.BuffEffectList[buffName] = nil
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
-- 卸载所有动画
|
|
|
|
|
function BuffCtrl:RemoveAllBuffEffect()
|
|
|
|
|
if not self.BuffEffectList then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
for name, v in pairs(self.BuffEffectList) do
|
|
|
|
|
poolManager:UnLoadAsset(name, v.node, PoolManager.AssetType.GameObject)
|
|
|
|
|
end
|
|
|
|
|
self.BuffEffectList = {}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
function BuffCtrl:AddBuffIcon(buff, icon)
|
2021-03-12 11:04:06 +08:00
|
|
|
|
local currBuff=buff
|
|
|
|
|
if not currBuff or not icon or icon == "" then
|
2020-11-01 15:46:48 +08:00
|
|
|
|
return
|
|
|
|
|
end
|
2021-03-12 11:04:06 +08:00
|
|
|
|
|
2020-11-01 15:46:48 +08:00
|
|
|
|
if not self.BuffIconList then
|
|
|
|
|
self.BuffIconList = {}
|
|
|
|
|
end
|
2021-03-12 11:04:06 +08:00
|
|
|
|
-- if not self.BuffIconList[buff.id] then
|
|
|
|
|
-- local buffGO = BattlePool.GetItem(self.buffRoot.transform, BATTLE_POOL_TYPE.BUFF_VIEW)
|
|
|
|
|
-- buffGO.transform.localScale = Vector3.one
|
|
|
|
|
-- buffGO.transform.localPosition = Vector3.zero
|
|
|
|
|
-- buffGO:SetActive(true)
|
|
|
|
|
-- self.BuffIconList[buff.id] = BuffView.New(buffGO, buff, icon)
|
|
|
|
|
-- else
|
|
|
|
|
-- self.BuffIconList[buff.id].count = self.BuffIconList[buff.id].count + 1
|
|
|
|
|
-- self.BuffIconList[buff.id]:SetCount()
|
|
|
|
|
-- end
|
|
|
|
|
|
|
|
|
|
LogRed(buff.id)
|
|
|
|
|
if not self.BuffIconList[currBuff.id] then
|
|
|
|
|
--便利所有之前存在的buff图标,有同类型,同数值的叠加,否则新建
|
|
|
|
|
for key, value in pairs(self.BuffIconList) do
|
|
|
|
|
local buffType=self.BuffIconList[key].buff.type
|
|
|
|
|
if currBuff.type == self.BuffIconList[key].buff.type then
|
|
|
|
|
if buffType == BuffName.PropertyChange then
|
|
|
|
|
--属性 判断属性类型,属性值,属性修改类型
|
|
|
|
|
local b = self.BuffIconList[key].buff
|
|
|
|
|
if self.BuffIconList[key].buffPropertyName == currBuff.propertyName and self.BuffIconList[key].buffCt == currBuff.changeType and self.BuffIconList[key].buffValue == currBuff.Value then
|
|
|
|
|
self.BuffIconList[key]:SetCount(self.BuffIconList[key].count+1)
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
--持续伤害类型,伤害系数
|
|
|
|
|
elseif buffType==BuffName.DOT then
|
|
|
|
|
if self.BuffIconList[key].buffDamageType==currBuff.damageType and self.BuffIconList[key].buffDamageFactor==currBuff.damageFactor then
|
|
|
|
|
self.BuffIconList[key]:SetCount(self.BuffIconList[key].count+1)
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
--控制类型
|
|
|
|
|
elseif buffType == BuffName.Control then
|
|
|
|
|
if self.BuffIconList[key].buffCtrlType==currBuff.ctrlType then
|
|
|
|
|
self.BuffIconList[key]:SetCount(self.BuffIconList[key].count+1)
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
elseif buffType == BuffName.HOT then
|
|
|
|
|
if self.BuffIconList[key].healValue==currBuff.healValue then
|
|
|
|
|
self.BuffIconList[key]:SetCount(self.BuffIconList[key].count+1)
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
2020-11-01 15:46:48 +08:00
|
|
|
|
end
|
2021-03-12 11:04:06 +08:00
|
|
|
|
|
2020-11-01 15:46:48 +08:00
|
|
|
|
|
2021-03-12 11:04:06 +08:00
|
|
|
|
local buffGO = BattlePool.GetItem(self.buffRoot.transform, BATTLE_POOL_TYPE.BUFF_VIEW)
|
|
|
|
|
buffGO.transform.localScale = Vector3.one
|
|
|
|
|
buffGO.transform.localPosition = Vector3.zero
|
|
|
|
|
buffGO:SetActive(true)
|
|
|
|
|
self.BuffIconList[currBuff.id] = BuffView.New(buffGO, buff, icon)
|
2020-11-01 15:46:48 +08:00
|
|
|
|
end
|
|
|
|
|
function BuffCtrl:RemoveBuffIcon(buff)
|
|
|
|
|
if not buff then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
if not self.BuffIconList then
|
|
|
|
|
return
|
|
|
|
|
end
|
2021-03-12 11:04:06 +08:00
|
|
|
|
-- if self.BuffIconList[buff.id] then
|
|
|
|
|
-- local count=self.BuffIconList[buff.id].count
|
|
|
|
|
-- if count==1 then
|
|
|
|
|
-- self.BuffIconList[buff.id]:Dispose()
|
|
|
|
|
-- self.BuffIconList[buff.id] = nil
|
|
|
|
|
-- else
|
|
|
|
|
-- self.BuffIconList[buff.id]:SetCount(count-1)
|
|
|
|
|
-- end
|
|
|
|
|
-- return
|
|
|
|
|
-- end
|
|
|
|
|
|
|
|
|
|
--便利所有之前存在的buff图标,有同类型,同数值的叠加,否则新建
|
|
|
|
|
for key, value in pairs(self.BuffIconList) do
|
|
|
|
|
local buffType = self.BuffIconList[key].buff.type
|
|
|
|
|
local floor = self.BuffIconList[key].count
|
|
|
|
|
|
|
|
|
|
if buff.type == buffType then
|
|
|
|
|
if buffType == BuffName.PropertyChange then
|
|
|
|
|
--属性 判断属性类型,属性值,属性修改类型
|
|
|
|
|
if self.BuffIconList[key].buffPropertyName==buff.propertyName and self.BuffIconList[key].buffValue==buff.Value and self.BuffIconList[key].buffCt==buff.changeType then
|
|
|
|
|
if floor==1 then
|
|
|
|
|
self.BuffIconList[key]:Dispose()
|
|
|
|
|
self.BuffIconList[key] = nil
|
|
|
|
|
else
|
|
|
|
|
self.BuffIconList[key]:SetCount(floor-1)
|
|
|
|
|
end
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
--持续伤害类型,伤害系数
|
|
|
|
|
elseif buffType == BuffName.DOT then
|
|
|
|
|
if self.BuffIconList[key].buffDamageType==buff.damageType and self.BuffIconList[key].buffDamageFactor==buff.damageFactor then
|
|
|
|
|
if floor==1 then
|
|
|
|
|
self.BuffIconList[key]:Dispose()
|
|
|
|
|
self.BuffIconList[key] = nil
|
|
|
|
|
else
|
|
|
|
|
self.BuffIconList[key]:SetCount(floor-1)
|
|
|
|
|
end
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
--控制类型
|
|
|
|
|
elseif buffType == BuffName.Control then
|
|
|
|
|
if self.BuffIconList[key].buffCtrlType==buff.ctrlType then
|
|
|
|
|
if floor==1 then
|
|
|
|
|
self.BuffIconList[key]:Dispose()
|
|
|
|
|
self.BuffIconList[key] = nil
|
|
|
|
|
else
|
|
|
|
|
self.BuffIconList[key]:SetCount(floor-1)
|
|
|
|
|
end
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
elseif buffType == BuffName.HOT then
|
|
|
|
|
if self.BuffIconList[key].healValue==buff.healValue then
|
|
|
|
|
if floor==1 then
|
|
|
|
|
self.BuffIconList[key]:Dispose()
|
|
|
|
|
self.BuffIconList[key] = nil
|
|
|
|
|
else
|
|
|
|
|
self.BuffIconList[key]:SetCount(floor-1)
|
|
|
|
|
end
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
2020-11-01 15:46:48 +08:00
|
|
|
|
end
|
|
|
|
|
-- 卸载所有动画
|
|
|
|
|
function BuffCtrl:RemoveAllBuffIcon()
|
|
|
|
|
if not self.BuffIconList then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
for id, v in pairs(self.BuffIconList) do
|
|
|
|
|
v:Dispose()
|
|
|
|
|
end
|
|
|
|
|
self.BuffIconList = {}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function BuffCtrl:OnBuffStart(buff)
|
|
|
|
|
LogGreen("buff"..buff.type)
|
|
|
|
|
-- 临时显示
|
|
|
|
|
if buff.type == BuffName.NoDead then
|
2021-03-12 14:20:14 +08:00
|
|
|
|
self.owner.Floater:TextBuffFloating(2, "不灭")
|
2020-11-01 15:46:48 +08:00
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local eConfig = _GetBuffEffectConfig(buff)
|
|
|
|
|
if not eConfig then return end
|
|
|
|
|
|
|
|
|
|
if buff.type == BuffName.PropertyChange then
|
|
|
|
|
if buff.changeType == 1 or buff.changeType == 2 then
|
|
|
|
|
self:AddBuffEffect(eConfig.Hit)
|
|
|
|
|
self:AddBuffEffect(eConfig.Continue, false, eConfig.ContinueOffset)
|
2021-03-12 14:20:14 +08:00
|
|
|
|
self.owner.Floater:TextBuffFloating(eConfig.DescColorType, GetLanguageStrById(eConfig.Describe).."提升")
|
2020-11-01 15:46:48 +08:00
|
|
|
|
self:AddBuffIcon(buff, eConfig.Icon)
|
|
|
|
|
SoundManager.PlaySound(SoundConfig.Sound_Buff)
|
|
|
|
|
else
|
|
|
|
|
self:AddBuffEffect(eConfig.DHit)
|
|
|
|
|
self:AddBuffEffect(eConfig.DContinue)
|
2021-03-12 14:20:14 +08:00
|
|
|
|
self.owner.Floater:TextBuffFloating(eConfig.DDescColorType, GetLanguageStrById(eConfig.Describe).."降低")
|
2020-11-01 15:46:48 +08:00
|
|
|
|
self:AddBuffIcon(buff, eConfig.DIcon)
|
|
|
|
|
SoundManager.PlaySound(SoundConfig.Sound_DeBuff)
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
self:AddBuffEffect(eConfig.Hit)
|
|
|
|
|
self:AddBuffEffect(eConfig.Continue, false, eConfig.ContinueOffset)
|
|
|
|
|
if eConfig.DescribeIcon and eConfig.DescribeIcon ~= "" then
|
|
|
|
|
self.owner.Floater:ImageBuffFloating(eConfig.DescribeIcon)
|
|
|
|
|
else
|
2021-01-26 17:08:39 +08:00
|
|
|
|
self.owner.Floater:TextBuffFloating(eConfig.DescColorType, GetLanguageStrById(eConfig.Describe))
|
2020-11-01 15:46:48 +08:00
|
|
|
|
end
|
|
|
|
|
self:AddBuffIcon(buff, eConfig.Icon)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
function BuffCtrl:OnBuffDodge(buff)
|
|
|
|
|
if buff.type == BuffName.Control and buff.caster.camp ~= self.owner.camp then
|
2021-01-26 17:08:39 +08:00
|
|
|
|
self.owner.Floater:ImageBuffFloating("z_zhandou_dikangzi_zh")
|
2020-11-01 15:46:48 +08:00
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
function BuffCtrl:OnBuffRoundChange(buff)
|
|
|
|
|
if self.BuffIconList[buff.id] then
|
|
|
|
|
self.BuffIconList[buff.id]:SetRound(buff)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function BuffCtrl:OnBuffCover(buff)
|
|
|
|
|
if self.BuffIconList[buff.id] then
|
|
|
|
|
self.BuffIconList[buff.id]:SetLayer(buff)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function BuffCtrl:OnBuffTrigger(buff)
|
|
|
|
|
local eConfig = _GetBuffEffectConfig(buff)
|
|
|
|
|
if not eConfig then return end
|
|
|
|
|
if buff.type == BuffName.PropertyChange then
|
|
|
|
|
if buff.changeType == 1 or buff.changeType == 2 then
|
|
|
|
|
self:AddBuffEffect(eConfig.Trigger, true)
|
|
|
|
|
else
|
|
|
|
|
self:AddBuffEffect(eConfig.DTrigger, true)
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
self:AddBuffEffect(eConfig.Trigger, true)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function BuffCtrl:OnBuffEnd(buff)
|
|
|
|
|
-- 临时显示
|
|
|
|
|
if buff.type == BuffName.NoDead then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local eConfig = _GetBuffEffectConfig(buff)
|
|
|
|
|
if not eConfig then return end
|
|
|
|
|
|
|
|
|
|
if buff.type == BuffName.PropertyChange then
|
|
|
|
|
if buff.changeType == 1 or buff.changeType == 2 then
|
|
|
|
|
self:RemoveBuffEffect(eConfig.Hit)
|
|
|
|
|
self:RemoveBuffEffect(eConfig.Continue)
|
|
|
|
|
self:RemoveBuffEffect(eConfig.Trigger)
|
|
|
|
|
self:RemoveBuffIcon(buff, eConfig.Icon)
|
|
|
|
|
else
|
|
|
|
|
self:RemoveBuffEffect(eConfig.DHit)
|
|
|
|
|
self:RemoveBuffEffect(eConfig.DContinue)
|
|
|
|
|
self:RemoveBuffEffect(eConfig.DTrigger)
|
|
|
|
|
self:RemoveBuffIcon(buff, eConfig.DIcon)
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
self:RemoveBuffEffect(eConfig.Hit)
|
|
|
|
|
self:RemoveBuffEffect(eConfig.Continue)
|
|
|
|
|
self:RemoveBuffEffect(eConfig.Trigger)
|
|
|
|
|
self:RemoveBuffIcon(buff, eConfig.Icon)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function BuffCtrl:Dispose()
|
|
|
|
|
|
|
|
|
|
-- 回收所有buff相关效果
|
|
|
|
|
self:RemoveAllBuffEffect()
|
|
|
|
|
self:RemoveAllBuffIcon()
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return BuffCtrl
|