using System.Collections; using System.Collections.Generic; using UnityEngine; public class Skill_BrutalSlash : ProjectileBase { [Header("기본 투사체")] public string m_projectile = "Projectile_BrutalSlash"; [Header("투사체 지속 시간")] public float projectileTime = 2f; [Header("마지막 투사체")] public string m_projectilelast = "Projectile_BrutalSlashLast"; //List list_PD = new List //{ // new ProjectileData(),new ProjectileData(),new ProjectileData(),new ProjectileData(), //}; //public override void Set(ProjectileData _data) //{ // base.Set(_data); // _data.LifeTime = projectileTime; // for (int i = 0; i < list_PD.Count; i++) // _data.Copy(list_PD[i]); // StartCoroutine(Co_Update()); //} //IEnumerator Co_Update() //{ // int i = 0; // yield return new WaitForSeconds(0.3f); // Shoot_Projectile(i++, m_projectile); // yield return new WaitForSeconds(0.3f); // Shoot_Projectile(i++, m_projectile); // yield return new WaitForSeconds(0.4f); // Shoot_Projectile(i++, m_projectile); // yield return new WaitForSeconds(1.0f); // Shoot_Projectile(i++, m_projectilelast); // yield return null; // Off(true); // m_ProjecTileData.shooter.Stop(false); //} //void Shoot_Projectile(int index, string proj) //{ // ProjectileInfo.Ins.Shoot_Projectile(proj, list_PD[index], pb => // { // Vector3 randomPosition = GetRandomPositionInSector(); // pb.m_Pierce = true; // pb.transform.position = m_ProjecTileData.shooter.Get_CenterPositionFoward(); // pb.transform.LookAt( // new Vector3(randomPosition.x, m_ProjecTileData.shooter.Get_Center_position().y, randomPosition.z)); // }); //} //Vector3 GetRandomPositionInSector() //{ // return (Random.insideUnitSphere * 10f) + // (m_ProjecTileData.shooter.Get_position() + m_ProjecTileData.shooter.transform.forward * 20f); //} public GameObject[] gos_effect; public Projectile_StopAndColliderControl m_sacc; public override void Set(ProjectileData _data) { _data.eStartPos = eProjectileStartPos.Shooter; base.Set(_data); StartCoroutine(Co_Update()); } IEnumerator Co_Update() { OptionInfo.Ins.Set_PCMove(m_ProjecTileData.shooter, false); DSUtil.InActivateGameObjects(gos_effect); yield return new WaitForSeconds(0.1f); DSUtil.InActivateGameObjects(gos_effect, 0); var shooterpos = m_ProjecTileData.shooter.Get_position(); gos_effect[0].transform.position = new Vector3(shooterpos.x, 0f, shooterpos.z); m_ProjecTileData.shooter.m_animation.speed = 0f; yield return new WaitForSeconds(WL.Combat.Weapon.WLSkillTiming.Seconds(this, "charge", 1.0f)); // WL #976 훅(1줄) — 모으기(애니메이션 멈춤) 시간 = WLSkillTiming.json(비수 기본 0.5 s · 규칙 없으면 원본 1.0 s) m_ProjecTileData.shooter.m_animation.speed = 1f; DSUtil.InActivateGameObjects(gos_effect, 1); WL.Combat.Weapon.WLShurikenRider.Begin(this); // WL #977 훅(1줄) — 경로 이펙트(Multiple Slashes 호)에 수리검 여러 개(WLShurikenRider.json) m_sacc.Set(m_ProjecTileData); yield return new WaitForSeconds(1.5f); OptionInfo.Ins.Set_PCMove(m_ProjecTileData.shooter, true); Off(true); } }