프로젝트 Common 스크립트 추가

This commit is contained in:
aube.lee
2025-01-21 22:53:52 +09:00
parent 8c2341ff7e
commit 3bb9913d16
38 changed files with 1672 additions and 121 deletions

View File

@@ -0,0 +1,38 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace TON
{
public class IngameScene : SceneBase
{
public override IEnumerator OnStart()
{
// Ingame 씬을 비동기로 로드한다.
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync("Ingame", LoadSceneMode.Single);
// 로드가 완료될 때 까지 yield return null 을 하면서 기다린다
while (!asyncLoad.isDone)
{
yield return null;
}
UIManager.Show<IngameUI>(UIList.IngameUI);
}
public override IEnumerator OnEnd()
{
yield return null;
UIManager.Hide<IngameUI>(UIList.IngameUI);
}
void OnEscapeExecute()
{
// TODO : 게임 일시정지 UI 노출 시 수행
// Time.timeScale = 0f;
// UIManager.Show<PausePopupUI>(UIList.PausePopupUI);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a468df02c01075748a9dd91a1d2ebfa8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,31 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace TON
{
public class TitleScene : SceneBase
{
public override IEnumerator OnStart()
{
// Title 씬을 비동기로 로드한다.
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync("Title", LoadSceneMode.Single);
// 로드가 완료될 때 까지 yield return null 을 하면서 기다린다
while (!asyncLoad.isDone)
{
yield return null;
}
UIManager.Show<TitleUI>(UIList.TitleUI);
}
public override IEnumerator OnEnd()
{
yield return null;
UIManager.Hide<TitleUI>(UIList.TitleUI);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5029637b314ef0640afdf5241828f847
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: