| using UnityEngine; | 
| using System.Collections.Generic; | 
| using System; | 
| using LitJson; | 
|   | 
|   | 
| public class BattleEndAction : RecordAction | 
| { | 
|     //  奖励数据之类的 | 
|     protected JsonData endData; | 
|   | 
|     protected Action onComplete; | 
|   | 
|     public BattleEndAction(BattleField _battleField, JsonData _endData, Action _onComplete) | 
|         : base(RecordActionType.Death, _battleField, null) | 
|     { | 
|         endData = _endData; | 
|         onComplete = _onComplete; | 
|     } | 
|   | 
|     public override void Run() | 
|     { | 
|         base.Run(); | 
|   | 
|         isFinish = true; | 
|         onComplete?.Invoke(); | 
|     } | 
|   | 
|     public override void ForceFinish() | 
|     { | 
|         if (isFinish) | 
|             return; | 
|         base.ForceFinish(); | 
|         onComplete?.Invoke(); | 
|     } | 
|   | 
|     public override bool IsFinished() | 
|     { | 
|         return isFinish; | 
|     } | 
|   | 
| } |