【战斗】战斗关闭时不再回收灵兽立绘资源,直接销毁,避免在UI上立绘不停播放攻击动作的问题
parent
1face65dbb
commit
56afe786be
|
@ -77,10 +77,8 @@ function BattleLogic.Init(data, _userData, maxRound)
|
|||
-- 监听英雄受到治疗
|
||||
BattleLogic.Event:AddEvent(BattleEventName.RoleBeTreated,function (castRole, realTreat, treat)
|
||||
if castRole.camp==0 then
|
||||
LogBattle("我方 英雄治疗"..treat)
|
||||
allHeroDamage=allHeroDamage+treat
|
||||
else
|
||||
LogBattle("敌方 英雄治疗"..treat)
|
||||
allEnemyDamage=allEnemyDamage+treat
|
||||
end
|
||||
end)
|
||||
|
@ -89,11 +87,9 @@ function BattleLogic.Init(data, _userData, maxRound)
|
|||
--我方阵营总攻击
|
||||
if atkRole.camp==0 then
|
||||
allHeroDamage=allHeroDamage+damage
|
||||
LogBattle("我方 英雄攻击"..damage)
|
||||
--敌方阵营
|
||||
else
|
||||
allEnemyDamage=allEnemyDamage+damage
|
||||
LogBattle("敌方 英雄攻击"..damage)
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
|
@ -43,10 +43,6 @@ local _ConditionConfig = {
|
|||
-- 判断概率
|
||||
local r = Random.Range01()
|
||||
local isRandomOk = r <= rand/10000
|
||||
|
||||
LogPink("凤凰技能随机数")
|
||||
LogPink("释放概率:"..rand/10000)
|
||||
LogPink("当前概率:"..r)
|
||||
return isRoundOk and isRandomOk
|
||||
end,
|
||||
|
||||
|
|
|
@ -160,7 +160,8 @@ function MonsterView:onDispose()
|
|||
Util.SetSpineGray(self.RoleLiveGOGraphic2, false)
|
||||
Util.SetColor(self.RoleLiveGOGraphic2, Color.New(1, 1, 1, 1))
|
||||
self.RoleLiveGOGraphic2.freeze = false
|
||||
poolManager:UnLoadLive(self.livePath, self.RoleLiveGO2)
|
||||
-- poolManager:UnLoadLive(self.livePath, self.RoleLiveGO2)
|
||||
GameObject.DestroyImmediate(self.RoleLiveGO2)
|
||||
-- 回收本节点
|
||||
BattlePool.RecycleItem(self.GameObject, BATTLE_POOL_TYPE.ENEMY_ROLE)
|
||||
end
|
Loading…
Reference in New Issue