using System.Collections; using System.Collections.Generic; using UnityEngine; public class Skill_HeavyRain : ProjectileBase { [Header("스킬 판정 범위")] public float area = 15f; [Header("스킬 갯수")] public int amount = 20; [Header("스킬 발사체")] public string projectile = "Projectile_HeavyRain"; List mm = new List(); public override void Set(ProjectileData _data) { if (mm.Count == 0) { for (int i = 0; i < amount + 10; i++) mm.Add(new ProjectileData()); } base.Set(_data); StartCoroutine(Co_HeavyRain()); } IEnumerator Co_HeavyRain() { int count = amount + (IsStep(1) ? (int)Get_AwakenData(1, 1) : 0) + (IsStep(2) ? (int)Get_AwakenData(2, 1) : 0) + (IsStep(3) ? (int)Get_AwakenData(3, 1) : 0); while (count > 0) { --count; if (DSUtil.CheckNull(m_ProjecTileData.shooter)) break; var enemies = Get_Enemies(m_ProjecTileData.shooter.transform, area); if (enemies.Count > 0) { mm[count].shooter = m_ProjecTileData.shooter; mm[count].target = enemies[Random.Range(0, enemies.Count)]; mm[count].eStartPos = eProjectileStartPos.Custom; mm[count].v3_StartPos = mm[count].target.Get_position(); ProjectileInfo.Ins.Shoot_Projectile(projectile, mm[count]); } yield return new WaitForSeconds(0.1f); } Off(true); } }