| | |
| | | |
| | | protected BattleObject caster = null; // 施法者 |
| | | |
| | | protected bool startCounting = false; |
| | | |
| | | protected bool pauseState = false; |
| | | |
| | | protected int curFrame = 0; |
| | | |
| | | protected List<GameNetPackBasic> packList; |
| | | |
| | | protected SkillRecordAction otherSkillAction; |
| | |
| | | |
| | | protected bool moveFinished = false; |
| | | |
| | | public SkillBase(BattleObject _caster, SkillConfig _skillCfg, HB427_tagSCUseSkill vNetData, List<GameNetPackBasic> _packList, BattleField _battleField = null) |
| | | public int fromSkillId; |
| | | |
| | | public SkillBase(BattleObject _caster, SkillConfig _skillCfg, HB427_tagSCUseSkill vNetData, List<GameNetPackBasic> _packList, BattleField _battleField = null) |
| | | { |
| | | caster = _caster; |
| | | skillConfig = _skillCfg; |
| | |
| | | |
| | | public virtual void Run() |
| | | { |
| | | if (startCounting) |
| | | { |
| | | curFrame++; |
| | | } |
| | | |
| | | if (null != skillEffect) |
| | | { |
| | | skillEffect.Run(); |
| | | if (skillEffect.IsFinished()) |
| | | { |
| | | skillEffect = null; |
| | | OnSkillFinished(); |
| | | } |
| | | else |
| | | { |
| | | skillEffect.Run(); |
| | | } |
| | | } |
| | | |
| | | if (otherSkillAction != null) |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public void Pause() |
| | | { |
| | | pauseState = startCounting; |
| | | startCounting = false; |
| | | } |
| | | |
| | | public void Resume() |
| | | { |
| | | startCounting = pauseState; |
| | | } |
| | | |
| | | |
| | | // 0·移动到距离目标n码,的距离释放(可配置,9999即原地释放,负数则是移动到人物背面,人物要转身) |
| | | // 1·移动到距离阵容位置n码的距离(如2号位,5号位)释放(即战场中央此类) |
| | |
| | | // 技能前摇帧结束 |
| | | public virtual void OnStartSkillFrameEnd() |
| | | { |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="times"></param> |
| | | public virtual void OnMiddleFrameStart(int times) |
| | | { |
| | | |
| | | // if (skillEffect != null) |
| | | { |
| | | skillEffect.OnMiddleFrameStart(times); |
| | |
| | | |
| | | public virtual void OnMiddleFrameEnd(int times, int hitIndex) |
| | | { |
| | | |
| | | // if (skillEffect != null) |
| | | { |
| | | skillEffect.OnMiddleFrameEnd(times, hitIndex); |
| | |
| | | /// </summary> |
| | | public virtual void OnFinalFrameStart() |
| | | { |
| | | |
| | | // if (skillEffect != null) |
| | | { |
| | | skillEffect.OnFinalFrameStart(); |
| | |
| | | /// 后摇结束 |
| | | /// </summary> |
| | | public virtual void OnFinalFrameEnd() |
| | | { |
| | | { |
| | | // if (skillEffect != null) |
| | | { |
| | | skillEffect.OnFinalFrameEnd(); |
| | |
| | | { |
| | | return false; |
| | | } |
| | | else |
| | | } |
| | | |
| | | if (otherSkillAction != null) |
| | | { |
| | | if (!otherSkillAction.IsFinished()) |
| | | { |
| | | OnSkillFinished(); |
| | | skillEffect = null; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | |
| | | bo.heroInfoBar.SetActive(true); |
| | | } |
| | | battleField.battleRootNode.skillMaskNode.SetActive(false); |
| | | |
| | | |
| | | |
| | | |
| | | return true; |
| | | } |
| | |
| | | { |
| | | BattleDebug.LogError("other skill casting " + combinePack.startTag.Tag); |
| | | otherSkillAction = combinePack.CreateSkillAction(); |
| | | otherSkillAction.fromSkillId = skillConfig.SkillID; |
| | | return; |
| | | } |
| | | } |