| | |
| | | bulletTrans.anchoredPosition = pos; |
| | | |
| | | Vector2 dir = end - start; |
| | | float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg - 90f; |
| | | bulletTrans.localRotation = Quaternion.Euler(0, 0, angle); |
| | | float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg + (caster.Camp == BattleCamp.Red ? 0 : 180); |
| | | bulletTrans.rotation = Quaternion.Euler(0, 0, angle); |
| | | |
| | | if (t >= 1f) |
| | | { |
| | |
| | | |
| | | int bounceHitIndex = 0; |
| | | |
| | | int tempBulletIndex = bulletIndex; |
| | | |
| | | var bulletCurve = BulletCurveFactory.CreateBulletCurve(caster, skillConfig, effectPlayer, target.heroRectTrans, tagUseSkillAttack.HurtList.ToList(), bulletIndex, (index, hitList) => |
| | | { |
| | | if (skillConfig.BulletPath == 4) |
| | |
| | | // 表现子弹飞行到目标位置 |
| | | onHit?.Invoke(index, new List<HB427_tagSCUseSkill.tagSCUseSkillHurt> { hurt }); |
| | | |
| | | if (bulletIndex == tagUseSkillAttack.HurtList.Length - 1) |
| | | if (bounceHitIndex >= tagUseSkillAttack.HurtList.Length) |
| | | { |
| | | caster.battleField.battleEffectMgr.RemoveEffect(skillConfig.BulletEffectId, effectPlayer); |
| | | } |
| | |
| | | if (isFinish) |
| | | return; |
| | | |
| | | if (bulletIndex >= skillConfig.ActiveFrames.Length - 1 && bounceHitIndex >= hitList.Count) |
| | | if (tempBulletIndex >= skillConfig.ActiveFrames.Length - 1 && bounceHitIndex >= hitList.Count) |
| | | { |
| | | isFinish = true; |
| | | } |