LobbyScene 추가
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
29
Gameton-06/Assets/Gameton/Scripts/Scenes/LobbyScene.cs
Normal file
29
Gameton-06/Assets/Gameton/Scripts/Scenes/LobbyScene.cs
Normal 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;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
Gameton-06/Assets/Gameton/Scripts/Scenes/LobbyScene.cs.meta
Normal file
11
Gameton-06/Assets/Gameton/Scripts/Scenes/LobbyScene.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a8df2e01b86f9f438ebc13b160dcbd3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Gameton-06/Assets/Gameton/Scripts/Shop.meta
Normal file
8
Gameton-06/Assets/Gameton/Scripts/Shop.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eb3ce7623982a694d8c520eeccf361af
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
14
Gameton-06/Assets/Gameton/Scripts/Shop/ShopClickHandler.cs
Normal file
14
Gameton-06/Assets/Gameton/Scripts/Shop/ShopClickHandler.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace TON
|
||||
{
|
||||
public class ShopClickHandler : MonoBehaviour
|
||||
{
|
||||
void OnMouseDown()
|
||||
{
|
||||
Debug.Log("상점이 클릭됨! (마우스 클릭 또는 터치)");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d0c948c863be22642bd0ccfb3b7e8b77
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -39,7 +39,7 @@ namespace TON
|
||||
|
||||
// 씬 변경
|
||||
UIManager.Hide<CharaterCreateUI>(UIList.CharaterCreateUI);
|
||||
Main.Singleton?.ChangeScene(SceneType.Ingame);
|
||||
Main.Singleton?.ChangeScene(SceneType.Lobby);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user