34 lines
906 B
C#
34 lines
906 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
namespace TON
|
|
{
|
|
public class ShopScene : SceneBase
|
|
{
|
|
public override IEnumerator OnStart()
|
|
{
|
|
// Title 씬을 비동기로 로드한다.
|
|
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync("Shop", LoadSceneMode.Single);
|
|
|
|
// 로드가 완료될 때 까지 yield return null 을 하면서 기다린다
|
|
while (!asyncLoad.isDone)
|
|
{
|
|
yield return null;
|
|
}
|
|
|
|
UIManager.Show<ShopUI>(UIList.ShopUI);
|
|
UIManager.Show<OptionUI>(UIList.OptionUI);
|
|
}
|
|
|
|
public override IEnumerator OnEnd()
|
|
{
|
|
yield return null;
|
|
|
|
UIManager.Hide<ShopUI>(UIList.ShopUI);
|
|
UIManager.Hide<OptionUI>(UIList.OptionUI);
|
|
}
|
|
}
|
|
}
|