using System.Collections; using System.Collections.Generic; using UnityEngine; public class Select_Bottle : ProjectileBase { public Bottle[] arr_Bottle; public override void Set(ProjectileData _data) { _data.IsRandomPos = true; base.Set(_data); //m_ProjectTileData.SkillDamage = table_selectskill.Ins.Get_Data(eEffect.Select_Bottle).ValueBase; StartCoroutine(Co_Bottle()); } IEnumerator Co_Bottle() { for (int i = 0; i < arr_Bottle.Length; i++) arr_Bottle[i].gameObject.SetActive(false); while (true) { if (m_ProjecTileData.shooter.IsDead()) break; yield return new WaitForSeconds(4f); m_ProjecTileData.target = ActorInfo.Ins.Get_Nearest_EnemyActor_orNull(m_ProjecTileData.shooter.IsEnemy(), m_ProjecTileData.shooter.Get_position()); if (m_ProjecTileData.target) { m_ProjecTileData.v3_StartPos = m_ProjecTileData.target.Get_position(); if (Vector3.Distance(m_ProjecTileData.target.Get_position(), m_ProjecTileData.shooter.Get_position()) < 15f) for (int i = 0; i < arr_Bottle.Length; i++) arr_Bottle[i].Set(m_ProjecTileData); } } Off(true); } }