몬스터 스킬 제거

This commit is contained in:
Mingu Kim
2025-03-03 01:39:46 +09:00
parent 8c00971304
commit 5880c7b932
12 changed files with 24 additions and 392 deletions

View File

@@ -103,24 +103,23 @@ namespace TON
SoundManager.instance.BgSoundPlay(null);
// 필요하다면 gameStarted = false; 등을 설정하여 한 번만 실행되게 함
}
}
private void SpawnBossMonster()
{
GameObject bossPrefab = GetBossPrefabForWave(currentWave);
// 스폰 포인트 배열의 처음과 마지막 위치에 보스 몬스터 생성
if (spawnPoints.Length >= 2)
{
// 왼쪽 스폰 포인트
GameObject leftBoss = Instantiate(bossPrefab, spawnPoints[0].position, Quaternion.identity);
monsterPool.Add(leftBoss);
activeMonsters.Add(leftBoss);
SetupBossComponents(leftBoss);
// 오른쪽 스폰 포인트
GameObject rightBoss = Instantiate(bossPrefab, spawnPoints[spawnPoints.Length - 1].position, Quaternion.identity);
monsterPool.Add(rightBoss);
activeMonsters.Add(rightBoss);
SetupBossComponents(rightBoss);
}
else
{
@@ -139,6 +138,22 @@ namespace TON
// 보스가 죽으면 Update에서 체크하여 다음 웨이브로 넘어감
}
private void SetupBossComponents(GameObject boss)
{
MonsterBase monsterBase = boss.GetComponent<MonsterBase>();
Attack attackComponent = boss.GetComponentInChildren<Attack>();
Eyesight eyesightComponent = boss.GetComponentInChildren<Eyesight>();
if (attackComponent != null)
attackComponent.SetMonsterBase(monsterBase);
if (eyesightComponent != null)
eyesightComponent.SetMonsterBase(monsterBase);
monsterPool.Add(boss);
activeMonsters.Add(boss);
}
private void StartNextWave()
{
StageManager.Singleton.SetWaveData(currentWave); // 웨이브 정보 전달.