| using UnityEngine; | 
| using System.Collections.Generic; | 
| using System; | 
|   | 
| public class BuffMountAction : RecordAction | 
| { | 
|     protected List<HB428_tagSCBuffRefresh> buffList; | 
|   | 
|     protected Action onComplete; | 
|   | 
|     public BuffMountAction(BattleField _battleField, List<HB428_tagSCBuffRefresh> buffPackList, Action _onComplete = null) | 
|         : base(RecordActionType.Death, _battleField, null) | 
|     { | 
|         isFinish = false; | 
|         buffList = buffPackList; | 
|         onComplete = _onComplete; | 
|     } | 
|   | 
|   | 
|     public override bool IsFinished() | 
|     { | 
|         return isFinish; | 
|     } | 
|   | 
|     public override void Run() | 
|     { | 
|         base.Run(); | 
|   | 
|         if (!isRunOnce) | 
|         { | 
|             foreach (var hB428_TagSCBuffRefresh in buffList) | 
|             { | 
|                 SkillConfig skillConfig = SkillConfig.Get((int)hB428_TagSCBuffRefresh.SkillID); | 
|                 BattleObject obj = battleField.battleObjMgr.GetBattleObject((int)hB428_TagSCBuffRefresh.ObjID); | 
|                 if (null != skillConfig && obj != null) | 
|                 { | 
|                     //  飘字 | 
|                     obj.heroInfoBar.ShowTips(skillConfig.SkillName); | 
|                 } | 
|             } | 
|   | 
|             //  加buff(onComplete写了) | 
|             onComplete?.Invoke(); | 
|   | 
|             isFinish = true; | 
|             return; | 
|         } | 
|   | 
|     } | 
|   | 
|     public override void ForceFinish() | 
|     { | 
|         if (isFinish) | 
|         { | 
|             return; | 
|         } | 
|   | 
|         //  1帧就结束了 不管 | 
|         base.ForceFinish(); | 
|     } | 
| } |