| | |
| | | protected float duration = 0f; |
| | | protected float elapsed = 0f; |
| | | |
| | | protected int mBulletIndex; |
| | | |
| | | protected List<HB427_tagSCUseSkill.tagSCUseSkillHurt> hurts = new List<HB427_tagSCUseSkill.tagSCUseSkillHurt>(); |
| | | |
| | | public BulletCurve(BattleObject caster, SkillConfig skillConfig, BattleEffectPlayer bulletEffect, RectTransform target, HB427_tagSCUseSkill tagUseSkillAttack, Action<int, List<HB427_tagSCUseSkill.tagSCUseSkillHurt>> onHit) |
| | | public BulletCurve(BattleObject caster, SkillConfig skillConfig, BattleEffectPlayer bulletEffect, RectTransform target, |
| | | HB427_tagSCUseSkill tagUseSkillAttack, int bulletIndex, Action<int, List<HB427_tagSCUseSkill.tagSCUseSkillHurt>> onHit) |
| | | { |
| | | this.caster = caster; |
| | | this.skillConfig = skillConfig; |
| | |
| | | this.onHit = onHit; |
| | | this.bulletTrans = bulletEffect.transform as RectTransform; |
| | | this.hurts = tagUseSkillAttack.HurtList.ToList(); |
| | | this.mBulletIndex = bulletIndex; |
| | | |
| | | // 设置bulletTrans坐标为caster.heroRectTrans的世界坐标转换到bulletTrans父节点下的本地坐标 |
| | | if (bulletTrans != null && caster.heroRectTrans != null) |
| | |
| | | protected virtual void ReachTarget() |
| | | { |
| | | finished = true; |
| | | onHit?.Invoke(0, hurts); |
| | | onHit?.Invoke(mBulletIndex, hurts); |
| | | caster.battleField.battleEffectMgr.RemoveEffect(skillConfig.BulletEffectId, bulletEffect); |
| | | } |
| | | |