OneShotOneKill/Assets/Script/Manager/Title_Mgr.cs

37 lines
1.3 KiB
C#

using System;
using System.Collections;
using UnityEngine;
using UnityEngine.U2D;
using UnityEngine.UI;
public class Title_Mgr : MonoBehaviourSingletonTemplate<Title_Mgr>
{
protected override void Awake()
{
base.Awake();
DontDestroy();
}
public IEnumerator Co_Check(Action<float> addslidevalue = null)
{
while (!TableChecker.Ins.CheckAllLoad()) yield return null;
// UI 아틀라스 로드
yield return AddrResourceMgr.Ins.LoadObjectSequential<SpriteAtlas>("MainUI/UIAtlas.spriteatlas", atlas => { UIAtlasMgr.Ins.Set(atlas); });
addslidevalue?.Invoke(0.1f);
// OverUI (NetWait, Option 등) 로드
yield return AddrResourceMgr.Ins.LoadObjectSequential<GameObject>("Title/OverUI.prefab",
go =>
{
var overui = DSUtil.Get_Clone(go);
DontDestroyOnLoad(overui);
});
addslidevalue?.Invoke(0.1f);
// 정인호 : 투사체, 이펙트 로딩이 느려 일단은 백그라운드에서 돌게
//yield return StartCoroutine(ProjectileMgr.Ins.Co_Load());
//yield return StartCoroutine(EffectMgr.Ins.Co_Load());
StartCoroutine(ProjectileMgr.Ins.Co_Load(addslidevalue));
StartCoroutine(EffectMgr.Ins.Co_Load(addslidevalue));
}
}