LobbyScene 추가

This commit is contained in:
aube.lee
2025-01-31 19:16:39 +09:00
parent 770562dd40
commit d73634fbab
8 changed files with 503 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ namespace TON
Empty,
Title,
Ingame,
Lobby,
}
public class Main : SingletonBase<Main>
@@ -64,6 +65,9 @@ namespace TON
case SceneType.Ingame:
StartCoroutine(ChangeScene<IngameScene>(onSceneChangeCompletedCallback));
break;
case SceneType.Lobby:
StartCoroutine(ChangeScene<LobbyScene>(onSceneChangeCompletedCallback));
break;
}
}

View File

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

View File

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

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: eb3ce7623982a694d8c520eeccf361af
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,14 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace TON
{
public class ShopClickHandler : MonoBehaviour
{
void OnMouseDown()
{
Debug.Log("상점이 클릭됨! (마우스 클릭 또는 터치)");
}
}
}

View File

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

View File

@@ -39,7 +39,7 @@ namespace TON
// 씬 변경
UIManager.Hide<CharaterCreateUI>(UIList.CharaterCreateUI);
Main.Singleton?.ChangeScene(SceneType.Ingame);
Main.Singleton?.ChangeScene(SceneType.Lobby);
}
}
}