| | |
| | | |
| | | public class DeathRecordAction : RecordAction |
| | | { |
| | | protected List<HB422_tagMCTurnFightObjDead> deadPackList = new List<HB422_tagMCTurnFightObjDead>(); |
| | | |
| | | public DeathRecordAction(BattleField _battleField, BattleObject _battleObj) |
| | | : base(RecordActionType.Death, _battleField, _battleObj) |
| | | { |
| | | isFinish = false; |
| | | } |
| | | public DeathRecordAction(BattleField _battleField, List<HB422_tagMCTurnFightObjDead> _deadPackList) |
| | | : base(RecordActionType.Death, _battleField, null) |
| | | { |
| | | isFinish = false; |
| | | deadPackList = _deadPackList; |
| | | } |
| | | |
| | | public override bool IsFinished() |
| | | { |
| | |
| | | public override void Run() |
| | | { |
| | | base.Run(); |
| | | isFinish = true; |
| | | battleObject.OnDeath(OnDeathAnimationEnd); |
| | | |
| | | if (!isRunOnce) |
| | | { |
| | | isRunOnce = true; |
| | | foreach (var deadPack in deadPackList) |
| | | { |
| | | BattleObject deadObj = battleField.battleObjMgr.GetBattleObject((int)deadPack.ObjID); |
| | | deadObj.OnDeath(OnDeathAnimationEnd); |
| | | } |
| | | return; |
| | | } |
| | | |
| | | } |
| | | |
| | | private void OnDeathAnimationEnd() |