hch
2025-09-15 0792ab377b82eed196ecdfd34dab84311bddf7a1
Main/System/Battle/Skill/SkillBase.cs
@@ -151,20 +151,20 @@
      // battleField.battleTweenMgr.OnPlayTween(tweener);
   }
   protected void MoveToTarget(RectTransform target, Vector2 offset, float duration, Action onComplete = null)
   protected void MoveToTarget(RectTransform target, Vector2 offset, Action _onComplete = null)
   {
      //   原地释放
      if (skillConfig.CastDistance >= 9999)
      {
         onComplete?.Invoke();
         _onComplete?.Invoke();
         return;
      }
      caster.motionBase.PlayAnimation(MotionName.run, true);
      var tweener = BattleUtility.MoveToTarget(caster.heroRectTrans, target, offset, duration, () =>
      var tweener = BattleUtility.MoveToTarget(caster.heroRectTrans, target, offset, () =>
      {
         caster.motionBase.PlayAnimation(MotionName.idle, true);
         onComplete?.Invoke();
         _onComplete?.Invoke();
      });
      battleField.battleTweenMgr.OnPlayTween(tweener);
   }
@@ -186,7 +186,7 @@
      RectTransform target = battleField.GetTeamNode(caster.GetEnemyCamp(), skillConfig);
      MoveToTarget(target, new Vector2(skillConfig.CastDistance, 0), moveTime, () =>
      MoveToTarget(target, new Vector2(skillConfig.CastDistance, 0), () =>
      {
         //   到位置转身(不一定非要转身 但是流程要写)
         TurnBack(() =>
@@ -198,7 +198,7 @@
                  () =>
                  {
                     //   回到原来的位置
                     MoveToTarget(battleField.GetTeamNode(caster.Camp, caster.teamHero.positionNum), Vector2.zero, moveTime,
                     MoveToTarget(battleField.GetTeamNode(caster.Camp, caster.teamHero.positionNum), Vector2.zero,
                        OnAttackFinish);
                  }
               , -1f);
@@ -225,7 +225,7 @@
      RectTransform targetTrans = battleField.GetTeamNode(battleCamp, mainTargetPosNum);
      MoveToTarget(targetTrans, new Vector2(skillConfig.CastDistance, 0), moveTime, () =>
      MoveToTarget(targetTrans, new Vector2(skillConfig.CastDistance, 0), () =>
      {
         //   到位置转身(不一定非要转身 但是流程要写)
         TurnBack(() =>
@@ -236,9 +236,9 @@
               TurnBack(
                  () =>
                  {
                     RectTransform rectTransform = battleField.GetTeamNode(caster.Camp, caster.teamHero.positionNum);
                     //   回到原来的位置
                     MoveToTarget(battleField.GetTeamNode(caster.Camp, caster.teamHero.positionNum), Vector2.zero, moveTime,
                        OnAttackFinish);
                     MoveToTarget(rectTransform, Vector2.zero, OnAttackFinish);
                  }
               , -1f);
            });
@@ -255,7 +255,7 @@
   {
      RectTransform target = battleField.GetTeamNode(caster.Camp, skillConfig);
      MoveToTarget(target, new Vector2(skillConfig.CastDistance, 0), moveTime, () =>
      MoveToTarget(target, new Vector2(skillConfig.CastDistance, 0), () =>
      {
         //   到位置转身(不一定非要转身 但是流程要写)
         TurnBack(() =>
@@ -268,7 +268,7 @@
                  {
                     //   回到原来的位置
                     MoveToTarget(battleField.GetTeamNode(caster.Camp, caster.teamHero.positionNum),
                        Vector2.zero, moveTime, OnAttackFinish);
                        Vector2.zero, OnAttackFinish);
                  }
               , -1f);
            });
@@ -376,7 +376,7 @@
      HashSet<BattleObject> highlightList = new HashSet<BattleObject>(battleField.battleObjMgr.GetBattleObjList(tagUseSkillAttack));
      highlightList.Add(caster);
      // caster.battleField.skillMask
      //   把这些BO全高亮 或者说把除了这些的都放在遮罩后面
      //   YYL TODO
   }
@@ -404,6 +404,7 @@
   protected virtual void OnHitEachTarget(int _hitIndex, BattleObject target, HB427_tagSCUseSkill.tagSCUseSkillHurt hurt)
   {
      // 伤害分布 (万分比)
      // Debug.LogError("skillConfig.DamageDivide.Count " + skillConfig.DamageDivide.Length + " _hitIndex " + _hitIndex);
      int[] damageDivide = skillConfig.DamageDivide[_hitIndex];
      long totalDamage = GeneralDefine.GetFactValue(hurt.HurtHP, hurt.HurtHPEx);