| | |
| | | using UnityEngine; |
| | | using System.Collections.Generic; |
| | | using Cysharp.Threading.Tasks; |
| | | |
| | | public class DeathRecordAction : RecordAction |
| | | { |
| | |
| | | int total = deadPackList.Count; |
| | | foreach (var deadPack in deadPackList) |
| | | { |
| | | index++; |
| | | isLastOne = index >= total; |
| | | BattleObject deadObj = battleField.battleObjMgr.GetBattleObject((int)deadPack.ObjID); |
| | | deadObj.OnDeath(() => |
| | | { |
| | | index++; |
| | | |
| | | isLastOne = index >= total; |
| | | |
| | | OnDeathAnimationEnd(deadObj); |
| | | |
| | | if (isLastOne) |
| | | { |
| | | isFinish = true; |
| | | UniTaskExtension.DelayTime((GameObject)null, 0.3f / battleField.speedRatio, () => |
| | | { |
| | | isFinish = true; |
| | | }); |
| | | } |
| | | }); |
| | | } |