OneShotOneKill/Assets/Script/Manager/Title_Mgr.cs

31 lines
959 B
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);
}
}