yyl
2 天以前 6faba902086330e9c2c49948b10e5aeecb893bcd
Main/System/Battle/Skill/SkillBase.cs
@@ -36,6 +36,8 @@
    public int fromSkillId;
   public bool isPlay = false;
    public SkillBase(BattleObject _caster, SkillConfig _skillCfg, HB427_tagSCUseSkill vNetData, List<GameNetPackBasic> _packList, BattleField _battleField = null)
   {
      caster = _caster;
@@ -48,13 +50,12 @@
      battleField = _battleField;
      packList = _packList;
   }
   public virtual void Run()
   {
      if (null != skillEffect)
      {
         if (skillEffect.IsFinished())
@@ -66,6 +67,7 @@
         {
            skillEffect.Run();
         }
         return;
      }
      if (otherSkillAction != null)
@@ -79,6 +81,7 @@
         {
            otherSkillAction.Run();
         }
         return;
      }
   }
@@ -289,6 +292,7 @@
      // OnMiddleFrameEnd 中摇结束
      // OnFinalFrameStart 后摇开始
      // OnFinalFrameEnd 后摇结束
      return caster.motionBase.PlaySkillAnimation(skillConfig, this, onComplete);
   }
@@ -302,6 +306,8 @@
         );
      skillEffect.Play(OnHitTargets);
      isPlay = true;
   }
   //   技能前摇帧结束
@@ -604,11 +610,22 @@
   }
   public virtual bool IsFinished()
   {
      if (!isPlay)
      {
         return false;
      }
      if (skillEffect != null)
      {
         if (!skillEffect.IsFinished())
         {
            return false;
         }
         else
         {
            skillEffect = null;
            OnSkillFinished();
            return false;
         }
      }
@@ -618,7 +635,14 @@
         {
            return false;
         }
         else
         {
            otherSkillAction = null;
            OnSkillFinished();
            return false;
         }
      }
      if (isFinished && moveFinished)
      {
@@ -632,7 +656,13 @@
         }
         battleField.battleRootNode.skillMaskNode.SetActive(false);
         return true;
         if (packList.Count > 0)
         {
            OnSkillFinished();
            return false;
         }
         return packList.Count <= 0;
      }
      else
      {
@@ -645,6 +675,7 @@
      skillEffect?.ForceFinished();
      isFinished = true;
      moveFinished = true;
      isPlay = true;
      while (packList.Count > 0)
      {
@@ -657,7 +688,7 @@
            {
               BattleDebug.LogError("other skill casting " + combinePack.startTag.Tag);
               otherSkillAction = combinePack.CreateSkillAction();
               otherSkillAction.fromSkillId = skillConfig.SkillID;
               //   强制结束其他技能
               otherSkillAction.ForceFinish();
               return;
@@ -666,7 +697,6 @@
         else if (pack is CustomB421ActionPack actionPack)
         {
            actionPack.Distribute();
            return;
         }
         PackageRegedit.Distribute(pack);
      }
@@ -679,6 +709,25 @@
         if (!skillEffect.IsFinished())
         {
            return;
         }
         else
         {
            skillEffect = null;
            OnSkillFinished();
         }
      }
      if (otherSkillAction != null)
      {
         if (!otherSkillAction.IsFinished())
         {
            return;
         }
         else
         {
            otherSkillAction = null;
            OnSkillFinished();
         }
      }
@@ -701,8 +750,9 @@
         else if (pack is CustomB421ActionPack actionPack)
         {
            actionPack.Distribute();
            return;
         }
         // Debug.LogError("Distribute pack " + pack.GetType().ToString());
         PackageRegedit.Distribute(pack);
      }