| | |
| | | foreach (var deadPack in deadPackList) |
| | | { |
| | | BattleObject deadObj = battleField.battleObjMgr.GetBattleObject((int)deadPack.ObjID); |
| | | deadObj.OnDeath(() => |
| | | if (null != deadObj) |
| | | { |
| | | index++; |
| | | |
| | | isLastOne = index >= total; |
| | | |
| | | OnDeathAnimationEnd(deadObj); |
| | | |
| | | if (isLastOne) |
| | | deadObj.OnDeath(() => |
| | | { |
| | | // UniTaskExtension.DelayTime((GameObject)null, 0.3f / battleField.speedRatio, () => |
| | | // { |
| | | isFinish = true; |
| | | // }); |
| | | } |
| | | }); |
| | | index++; |
| | | |
| | | isLastOne = index >= total; |
| | | |
| | | OnDeathAnimationEnd(deadObj); |
| | | |
| | | if (isLastOne) |
| | | { |
| | | // UniTaskExtension.DelayTime((GameObject)null, 0.3f / battleField.speedRatio, () => |
| | | // { |
| | | isFinish = true; |
| | | // }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | return; |
| | | } |
| | |
| | | { |
| | | // 设置结束flag 记得清空motionBase里的事件 |
| | | base.ForceFinish(); |
| | | |
| | | } |
| | | } |