using System.Collections.Generic; public class Skill_MultiShot : ProjectileBase { public Skill_MultiShot_Arrow[] arrows; List list_deathmob = new List(); public override void Set(ProjectileData _data) { list_deathmob.Clear(); _data.eStartPos = eProjectileStartPos.ShooterCenter; base.Set(_data); transform.rotation = _data.shooter.transform.rotation; _data.LifeTime = 10f; for (int i = 0; i < arrows.Length; i++) arrows[i].gameObject.SetActive(false); var arrowcount = IsStep(1) ? 5 : 3; for (int i = 0; i < arrowcount; i++) arrows[i].Set(_data, IsStep(2), actor => { var mob = actor as MobActor; if (mob != null && mob.IsDead() && list_deathmob.Find(f => f == mob) == null) list_deathmob.Add(mob); }); StartCoroutine(Co_Off(3f)); } }