2024-12-15 01:39:39 +00:00
|
|
|
using System.Collections;
|
|
|
|
|
|
|
|
|
|
public class MobControlMgrList : MonoBehaviourSingletonTemplate<MobControlMgrList>
|
|
|
|
|
{
|
2025-03-10 04:57:13 +00:00
|
|
|
IEnumerator Start()
|
2024-12-15 01:39:39 +00:00
|
|
|
{
|
2025-03-10 04:57:13 +00:00
|
|
|
var mobloads = GetComponentsInChildren<MobControlMgr>();
|
2024-12-15 01:39:39 +00:00
|
|
|
|
2025-03-10 04:57:13 +00:00
|
|
|
// 모든 mobloads가 로드 완료될 때까지 대기
|
|
|
|
|
while (true)
|
2024-12-15 01:39:39 +00:00
|
|
|
{
|
2025-03-10 04:57:13 +00:00
|
|
|
bool allLoaded = true;
|
2024-12-15 01:39:39 +00:00
|
|
|
|
2025-03-10 04:57:13 +00:00
|
|
|
for (int i = 0; i < mobloads.Length; i++)
|
2024-12-15 01:39:39 +00:00
|
|
|
{
|
2025-03-10 04:57:13 +00:00
|
|
|
if (!mobloads[i].Get_LoadComplete())
|
|
|
|
|
{
|
|
|
|
|
allLoaded = false;
|
|
|
|
|
break; // 하나라도 로드 안 됐으면 루프 종료
|
|
|
|
|
}
|
2024-12-15 01:39:39 +00:00
|
|
|
}
|
2025-03-10 04:57:13 +00:00
|
|
|
|
|
|
|
|
if (allLoaded) break; // 모든 로드 완료 시 while 루프 탈출
|
|
|
|
|
|
|
|
|
|
yield return null; // 다음 프레임까지 대기
|
2024-12-15 01:39:39 +00:00
|
|
|
}
|
|
|
|
|
|
2025-03-26 00:49:56 +00:00
|
|
|
if (LoadingUI.isIns) LoadingUI.Ins.End_Loading(0);
|
2024-12-15 01:39:39 +00:00
|
|
|
}
|
|
|
|
|
}
|