zxl
/
CTT
forked from Cal/CTT
1
0
Fork 0
CTT/Unity/Assets/Model/Component/SceneChangeComponent.cs

51 lines
1.1 KiB
C#
Raw Normal View History

2021-04-10 19:49:32 +08:00
//using UnityEngine;
//using UnityEngine.SceneManagement;
2021-04-08 20:09:59 +08:00
2021-04-10 19:49:32 +08:00
//namespace ET
//{
2021-04-08 20:09:59 +08:00
2021-04-10 19:49:32 +08:00
// public class SceneChangeComponentUpdateSystem: UpdateSystem<SceneChangeComponent>
// {
// public override void Update(SceneChangeComponent self)
// {
// if (self.loadMapOperation.isDone)
// {
// self.tcs.SetResult();
// }
// }
// }
2021-04-08 20:09:59 +08:00
2021-04-10 19:49:32 +08:00
// public class SceneChangeComponent: Entity
// {
// public AsyncOperation loadMapOperation;
// public ETTaskCompletionSource tcs;
// public float deltaTime;
// public int lastProgress = 0;
2021-04-08 20:09:59 +08:00
2021-04-10 19:49:32 +08:00
// public ETTask ChangeSceneAsync(string sceneName, LoadSceneMode loadSceneMode= LoadSceneMode.Single)
// {
// this.tcs = new ETTaskCompletionSource();
// // 加载map
// this.loadMapOperation = SceneManager.LoadSceneAsync(sceneName, loadSceneMode);
// return this.tcs.Task;
// }
2021-04-08 20:09:59 +08:00
2021-04-10 19:49:32 +08:00
// public int Process
// {
// get
// {
// if (this.loadMapOperation == null)
// {
// return 0;
// }
// return (int)(this.loadMapOperation.progress * 100);
// }
// }
2021-04-08 20:09:59 +08:00
2021-04-10 19:49:32 +08:00
// public void Finish()
// {
// this.tcs.SetResult();
// }
2021-04-08 20:09:59 +08:00
2021-04-10 19:49:32 +08:00
// }
//}