UI框架开发中
This commit is contained in:
@@ -6,13 +6,32 @@ using YooAsset;
|
||||
public class GameStart : MonoBehaviour
|
||||
{
|
||||
SceneHandle sceneHandle;
|
||||
|
||||
void Start()
|
||||
{
|
||||
DontDestroyOnLoad(gameObject);
|
||||
StartCoroutine(LoadScene());
|
||||
//StartCoroutine(LoadUIManager());
|
||||
StartCoroutine(StartupSequence());
|
||||
}
|
||||
IEnumerator LoadScene()
|
||||
|
||||
IEnumerator StartupSequence()
|
||||
{
|
||||
Debug.Log("<22><>ʼ<EFBFBD><CABC>Ϸ<EFBFBD><CFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
|
||||
|
||||
yield return StartCoroutine(InitializeGameSystems());
|
||||
|
||||
yield return StartCoroutine(LoadMainScene());
|
||||
|
||||
Debug.Log("<22><>Ϸ<EFBFBD><CFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
}
|
||||
|
||||
IEnumerator InitializeGameSystems()
|
||||
{
|
||||
Debug.Log("<22><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>Ϸϵͳ...");
|
||||
GameSystem.Inst.Init();
|
||||
Debug.Log("<22><>Ϸϵͳ<CFB5><CDB3>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
yield return null;
|
||||
}
|
||||
IEnumerator LoadMainScene()
|
||||
{
|
||||
sceneHandle = YooAssets.LoadSceneAsync("MirrorRoomOffline");
|
||||
//sceneHandle = YooAssets.LoadSceneAsync("Game");
|
||||
@@ -23,17 +42,6 @@ public class GameStart : MonoBehaviour
|
||||
};
|
||||
yield return sceneHandle;
|
||||
}
|
||||
//IEnumerator LoadUIManager()
|
||||
//{
|
||||
// AssetHandle _handle = YooAssets.LoadAssetAsync<GameObject>("UIManager");
|
||||
// _handle.Completed += (handle) =>
|
||||
// {
|
||||
// GameObject go = Instantiate((GameObject)_handle.AssetObject);
|
||||
// DontDestroyOnLoad(go);
|
||||
// Debug.Log(_handle.AssetObject);
|
||||
// };
|
||||
// yield return _handle;
|
||||
//}
|
||||
IEnumerator LoadNetWorkHUD()
|
||||
{
|
||||
AssetHandle _handle = YooAssets.LoadAssetAsync<GameObject>("MyNetWorkHUD");
|
||||
@@ -44,12 +52,4 @@ public class GameStart : MonoBehaviour
|
||||
};
|
||||
yield return _handle;
|
||||
}
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
//if(sceneHandle!=null && sceneHandle.IsValid)
|
||||
//{
|
||||
// Debug.Log(sceneHandle.Progress);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user