보스 완

This commit is contained in:
김도환
2026-05-10 03:48:43 +09:00
parent ee05d6eda9
commit b8a119be87
8 changed files with 361 additions and 190 deletions

View File

@@ -16,13 +16,13 @@ namespace Unicorn.Boss
private UnicornPhase _unicornPhase = UnicornPhase.Start;
private Queue<GameObject> _p1Ps = new Queue<GameObject>();
private SpriteRenderer _renderer;
private const float P1PC = 12;
private const float P1PC = 50;
public Transform projContainer;
public GameObject phase1Proj;
private void Start()
private new void Start()
{
_renderer = GetComponent<SpriteRenderer>();
StartCoroutine(Started());
@@ -31,7 +31,8 @@ namespace Unicorn.Boss
private IEnumerator Started()
{
const float target = 360*5/P1PC;
Invulnerable = true;
const float target = P1PC*5;
while (_p1Ps.Count < target)
{
for (var i = 0; i < 5 && _p1Ps.Count < target; i++) //프레임당 5개씩 생성
@@ -45,26 +46,21 @@ namespace Unicorn.Boss
StartCoroutine(Phase1());
}
private void FixedUpdate()
{
}
// 수정된 Phase1 로직
private IEnumerator Phase1()
{
Invulnerable = false;
_unicornPhase = UnicornPhase.P1;
float angleStep = 360f / P1PC; // 각도 간격 (30도)
const float angleStep = 360f / P1PC; // 각도 간격 (30도)
for (int i = 0; i < P1PC; i++)
for (var i = 0; i < P1PC; i++)
{
var dequeue = _p1Ps.Dequeue();
dequeue.SetActive(true);
dequeue.transform.position = transform.position;
float targetAngle = transform.rotation.eulerAngles.z + (angleStep * i);
var targetAngle = transform.rotation.eulerAngles.z + (angleStep * i);
dequeue.transform.rotation = Quaternion.Euler(0, 0, targetAngle);
_p1Ps.Enqueue(dequeue);
yield return new WaitForSeconds(.2f);
}
yield return new WaitForSeconds(1);
StartCoroutine(Phase1());