| // #if UNITY_EDITOR | 
| // using UnityEngine; | 
| // using System.Collections.Generic; | 
|   | 
| // public class EditorSkillRecordAction : RecordAction | 
| // { | 
| //     public int SkillId; | 
|   | 
| //     public SkillConfig skillConfig; | 
|   | 
| //     protected SkillBase skillBase; | 
|   | 
| //     protected List<Dictionary<int, List<int>>> damageList = new List<Dictionary<int, List<int>>>(); | 
|      | 
| //     private bool isCast = false; | 
|   | 
|   | 
| //     public EditorSkillRecordAction(int _SkillId, BattleField _battleField, BattleObject _battleObj) | 
| //         : base(RecordActionType.Skill, _battleField, _battleObj) | 
| //     { | 
| //         SkillId = _SkillId; | 
|   | 
| //         skillConfig = SkillConfig.Get(SkillId); | 
|   | 
| //         if (null == skillConfig) | 
| //         { | 
| //             BattleDebug.LogError("找不到技能配置 " + SkillId); | 
| //         } | 
|   | 
| //         skillBase = SkillFactory.CreateSkill(skillConfig); | 
|   | 
| //         // _battleObj使用了SkillId的技能 | 
| //         damageList = skillBase.GetDamageList(battleObject, battleField); | 
| //     } | 
|   | 
| //     public EditorSkillRecordAction(int _SkillId, BattleField _battleField, BattleObject _battleObj, List<Dictionary<int, List<int>>> _damageList) | 
| //         : base(RecordActionType.Skill, _battleField, _battleObj) | 
| //     { | 
| //         SkillId = _SkillId; | 
|   | 
| //         skillConfig = SkillConfig.Get(SkillId); | 
|   | 
| //         if (null == skillConfig) | 
| //         { | 
| //             BattleDebug.LogError("找不到技能配置 " + SkillId); | 
| //         } | 
|   | 
| //         skillBase = SkillFactory.CreateSkill(skillConfig); | 
|   | 
| //         damageList = _damageList; | 
| //         // _battleObj使用了SkillId的技能 | 
| //     } | 
|   | 
| //     public override bool IsFinished() | 
| //     { | 
| //         return skillBase.IsFinished(); | 
| //     } | 
|   | 
|   | 
| //     public override void Run() | 
| //     { | 
| //         base.Run(); | 
|   | 
| //         if (null == skillBase) | 
| //         { | 
| //             return; | 
| //         } | 
|   | 
| //         if (!skillBase.IsFinished()) | 
| //         { | 
| //             skillBase.Run(); | 
| //         } | 
|   | 
| //         if (isCast) | 
| //             return; | 
|   | 
| //         if (damageList.Count > 0) | 
| //         { | 
| //             skillBase.Cast(battleObject, battleField, damageList); | 
| //         } | 
| //         else | 
| //         { | 
| //             skillBase.ForceFinished(); | 
| //         } | 
|   | 
| //         isCast = true; | 
| //     } | 
| // } | 
| // #endif |