41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Skill_RapidShot : ProjectileBase
|
|
{
|
|
[Header("투사체")]
|
|
public string m_projectile = "Projectile_ArcherSkill2Arrow";
|
|
[Header("발사 간격")]
|
|
public float gaptime = 0.25f;
|
|
|
|
List<ProjectileData> list_data = new List<ProjectileData>
|
|
{
|
|
new ProjectileData(),new ProjectileData(),new ProjectileData(),new ProjectileData(),new ProjectileData(),
|
|
new ProjectileData(),new ProjectileData(),
|
|
};
|
|
|
|
public override void Set(ProjectileData _data)
|
|
{
|
|
_data.eStartPos = eProjectileStartPos.ShooterCenter;
|
|
base.Set(_data);
|
|
for (int i = 0; i < list_data.Count; i++)
|
|
_data.Copy(list_data[i]);
|
|
StartCoroutine(Co_Update());
|
|
}
|
|
|
|
IEnumerator Co_Update()
|
|
{
|
|
InGameInfo.Ins.Show_Effect("Effect_BulletTarget", m_ProjecTileData.target, eEffectLocation.Mid, 1.5f);
|
|
yield return new WaitForSeconds(1f);
|
|
|
|
for (int i = 0; i < list_data.Count; i++)
|
|
{
|
|
ProjectileInfo.Ins.Shoot_Projectile(m_projectile, list_data[i], pb => { pb.m_Pierce = true; });
|
|
m_ProjecTileData.shooter.KnockBack(Time.deltaTime);
|
|
yield return new WaitForSeconds(gaptime);
|
|
}
|
|
|
|
Off(true);
|
|
}
|
|
} |