| | |
| | | |
| | | public override void OnMiddleFrameEnd(int times, int hitIndex) |
| | | { |
| | | BattleDebug.LogError($" NormalSkillEffect OnMiddleFrameEnd times : {times}, hitIndex : {hitIndex}"); |
| | | |
| | | int mainTargetIndex = BattleUtility.GetMainTargetPositionNum(caster, tagUseSkillAttack.HurtList.ToList(), skillConfig); |
| | | |
| | | BattleCamp battleCamp = skillConfig.TagFriendly == 1 ? caster.Camp : caster.GetEnemyCamp(); |
| | | |
| | | RectTransform targetTransform = caster.battleField.GetTeamNode(battleCamp, mainTargetIndex); |
| | | |
| | | if (skillConfig.ExplosionEffectId > 0) |
| | | { |
| | | caster.battleField.battleEffectMgr.PlayEffect(caster, skillConfig.ExplosionEffectId, targetTransform, caster.Camp); |
| | | } |
| | | |
| | | if (skillConfig.ExplosionEffect2 > 0) |
| | | { |
| | | caster.battleField.battleEffectMgr.PlayEffect(caster, skillConfig.ExplosionEffect2, targetTransform, caster.Camp); |
| | | } |
| | | |
| | | for (int i = 0; i < tagUseSkillAttack.HurtList.Length; i++) |
| | | { |
| | | var hurt = tagUseSkillAttack.HurtList[i]; |
| | | BattleObject target = caster.battleField.battleObjMgr.GetBattleObject((int)hurt.ObjID); |
| | | if (target == null) |
| | | { |
| | | BattleDebug.LogError("特效目标为空 target == null ObjId : " + hurt.ObjID); |
| | | Debug.LogError("特效目标为空 target == null ObjId : " + hurt.ObjID); |
| | | continue; |
| | | } |
| | | |
| | | caster.battleField.battleEffectMgr.PlayEffect(target.ObjID, skillConfig.ExplosionEffectId, target.heroGo.transform, target.Camp); |
| | | caster.battleField.battleEffectMgr.PlayEffect(target.ObjID, skillConfig.ExplosionEffect2, target.heroGo.transform, target.Camp); |
| | | if (skillConfig.ExplosionEffect3 > 0) |
| | | { |
| | | caster.battleField.battleEffectMgr.PlayEffect(target, skillConfig.ExplosionEffect3, target.heroGo.transform, caster.Camp); |
| | | } |
| | | if (skillConfig.ExplosionEffect4 > 0) |
| | | { |
| | | caster.battleField.battleEffectMgr.PlayEffect(target, skillConfig.ExplosionEffect4, target.heroGo.transform, caster.Camp); |
| | | } |
| | | } |
| | | |
| | | onHit?.Invoke(hitIndex, tagUseSkillAttack.HurtList.ToList()); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 后摇结束 |
| | | /// </summary> |
| | | public override void OnFinalFrameEnd() |
| | | { |
| | | base.OnFinalFrameEnd(); |
| | | isFinish = true; |
| | | } |
| | | } |