2025-01-20 06:47:44 +00:00
|
|
|
|
using System.Collections;
|
|
|
|
|
|
using UnityEngine;
|
2024-12-15 01:39:39 +00:00
|
|
|
|
|
|
|
|
|
|
public class Skill_MultiShot : ProjectileBase
|
|
|
|
|
|
{
|
2025-01-20 06:47:44 +00:00
|
|
|
|
[Header("지속 시간")]
|
|
|
|
|
|
public float lifetime = 10f;
|
2025-05-08 00:54:46 +00:00
|
|
|
|
[Header("투사체 프리팹")]
|
|
|
|
|
|
public string arrowprefab = "Projectile_Skill_MultiShot";
|
2025-01-20 06:47:44 +00:00
|
|
|
|
[Header("추가 화살 갯수")]
|
|
|
|
|
|
public int addarrow = 2;
|
|
|
|
|
|
[Header("데미지 감소량")]
|
|
|
|
|
|
public double reducedmg = 0.2d;
|
2024-12-15 01:39:39 +00:00
|
|
|
|
|
|
|
|
|
|
public override void Set(ProjectileData _data)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Set(_data);
|
2026-10-23 15:51:48 +00:00
|
|
|
|
if (WL.Combat.Weapon.WLRapidShot.TakeMulti(this, _data)) return; // WL #975 훅(1줄) — 활 기본 스킬: 주력과 같은 모으기 → 앞쪽 부채꼴 화살 10발 × 3회(0.5 초 간격 · WLRapidShot.json multi) · 원본 버프(일반 공격 화살 추가) 건너뜀
|
2025-01-20 06:47:44 +00:00
|
|
|
|
m_LifeTime = lifetime;
|
2025-05-08 00:54:46 +00:00
|
|
|
|
_data.shooter.Buff_or_Debuff(eCC.MultiShot, m_LifeTime, reducedmg, addarrow, 0f, arrowprefab);
|
2025-01-20 06:47:44 +00:00
|
|
|
|
StartCoroutine(Co_Update());
|
|
|
|
|
|
}
|
2024-12-15 01:39:39 +00:00
|
|
|
|
|
2025-01-20 06:47:44 +00:00
|
|
|
|
IEnumerator Co_Update()
|
|
|
|
|
|
{
|
|
|
|
|
|
while (m_LifeTime > 0f)
|
|
|
|
|
|
{
|
|
|
|
|
|
yield return null;
|
|
|
|
|
|
m_LifeTime -= Time.deltaTime;
|
2025-01-28 06:46:25 +00:00
|
|
|
|
if (DSUtil.CheckNull(m_ProjecTileData.shooter)) break;
|
2025-01-20 06:47:44 +00:00
|
|
|
|
transform.position = m_ProjecTileData.shooter.Get_Center_position();
|
|
|
|
|
|
}
|
2024-12-15 01:39:39 +00:00
|
|
|
|
|
2025-01-20 06:47:44 +00:00
|
|
|
|
Off(true);
|
2024-12-15 01:39:39 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|