using System.Collections; using System.Collections.Generic; using UnityEngine; public class Select_Star : ProjectileBase { public override void Set(ProjectileData _data) { base.Set(_data); StartCoroutine(Co_Update()); } IEnumerator Co_Update() { var damagerate = table_selectskill.Ins.Get_Data(eEffect.Select_Star); float circleR = 1.5f; //반지름 float deg = 360f / 32f; //각도 while (true) { for (int i = 0; i < 32; i++) { var rad = Mathf.Deg2Rad * deg * i; var x = circleR * Mathf.Sin(rad); var z = circleR * Mathf.Cos(rad); var pos = m_ProjecTileData.shooter.Get_Center_position() + new Vector3(x, 2f, z); ProjectileInfo.Ins.Shoot_Projectile("ProjectileStar", m_ProjecTileData.shooter, null, damagerate.ValueBase, pos); //InGameInfo.Ins.Show_Effect(eEffect.ProjectileStarFlash, pos); yield return new WaitForSeconds(0.05f); } yield return new WaitForSeconds(5f); } } Vector3 Get_CirclePoint(float theta, float radius, float y, Vector3 pos) { return new Vector3(Mathf.Cos(theta) * radius + pos.x, y, Mathf.Sin(theta) * radius + pos.z); } }