33 lines
873 B
C#
33 lines
873 B
C#
using System.Collections;
|
|
using UnityEngine;
|
|
|
|
public class Skill_MultiShot : ProjectileBase
|
|
{
|
|
[Header("지속 시간")]
|
|
public float lifetime = 10f;
|
|
[Header("추가 화살 갯수")]
|
|
public int addarrow = 2;
|
|
[Header("데미지 감소량")]
|
|
public double reducedmg = 0.2d;
|
|
|
|
public override void Set(ProjectileData _data)
|
|
{
|
|
base.Set(_data);
|
|
m_LifeTime = lifetime;
|
|
_data.shooter.Buff_or_Debuff(eCC.MultiShot, m_LifeTime, reducedmg, addarrow);
|
|
StartCoroutine(Co_Update());
|
|
}
|
|
|
|
IEnumerator Co_Update()
|
|
{
|
|
while (m_LifeTime > 0f)
|
|
{
|
|
yield return null;
|
|
m_LifeTime -= Time.deltaTime;
|
|
if (DSUtil.CheckNull(m_ProjecTileData.shooter)) break;
|
|
transform.position = m_ProjecTileData.shooter.Get_Center_position();
|
|
}
|
|
|
|
Off(true);
|
|
}
|
|
} |