【战斗】尝试修复竞技场战斗报错

dev_chengFeng
gaoxin 2021-05-27 22:11:06 +08:00
parent 361c3549be
commit a1df6cbcf5
1 changed files with 4 additions and 1 deletions

View File

@ -500,7 +500,9 @@ function PlayerView:OnceDamaged(atkRole, dmg, bCrit, finalDmg, damageType, dotTy
end)
self.GameObject.transform.parent:DOShakeAnchorPos(0.3, Vector2.New(200, 100), 100, 50, false, true):OnComplete(function ()
self.GameObject.transform.parent.anchoredPosition = Vector2.New(self.role.position == 1 and -145 or 0, -221)
if self.GameObject then
self.GameObject.transform.parent.anchoredPosition = Vector2.New(self.role.position == 1 and -145 or 0, -221)
end
end)
-- 受击放大1.2倍
@ -618,6 +620,7 @@ function PlayerView:onDispose()
poolManager:UnLoadLive(self.livePath, self.RoleLiveGO2)
-- 回收本节点
BattlePool.RecycleItem(self.GameObject, BATTLE_POOL_TYPE.MY_ROLE)
self.GameObject = nil
end