新版loading逻辑
This commit is contained in:
1 parent
3c64109090
commit
ae58f4d461
367 files changed
+74232
-220035
No files matched your search
@@ -128,8 +128,8 @@ class GameRoomDownLoad : MonoBehaviour
|
||||
var newtask = Instantiate(downLoadTask, content);
|
||||
var currentTask = newtask.GetComponent<GameRoomDownloadTask>();
|
||||
currentTask.Init(RoomId, fileName,gameObject);
|
||||
Loom.Current.StartCoroutine(Utils.DownloadVideo(fileName, url
|
||||
, (p, req) =>
|
||||
Loom.Current.StartCoroutine(Utils.DownloadFileWithProcess(fileName, url
|
||||
, path,(p, req) =>
|
||||
{
|
||||
currentTask.UpdateProcess(p);
|
||||
processing(p);
|
||||
|
||||
@@ -76,7 +76,7 @@ public class GameRoomMapItem : MonoBehaviour, IPointerExitHandler, IPointerEnter
|
||||
downloading.SetActive(true);
|
||||
downloadTxt.SetActive(false);
|
||||
slider.gameObject.SetActive(true);
|
||||
Loom.Current.StartCoroutine(Utils.DownloadVideo(map.FileName, map.Url, (p, req) =>
|
||||
Loom.Current.StartCoroutine(Utils.DownloadFileWithProcess(map.FileName, map.Url, path,(p, req) =>
|
||||
{
|
||||
if (gameObject != null)
|
||||
slider.value = p;
|
||||
|
||||
@@ -57,41 +57,7 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
this.area = area;
|
||||
this.refresh = refresh;
|
||||
map = myMap;
|
||||
//localY = transform.GetComponent<RectTransform>().rect.height;
|
||||
//Debug.Log(localY);
|
||||
//UIManager.AddEvent(gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, (Base) =>
|
||||
//{
|
||||
// UIManager.ShowMapDetailPanel(myMap.Id);
|
||||
//});
|
||||
//UIManager.AddEvent(gameObject, UnityEngine.EventSystems.EventTriggerType.PointerEnter, (Base) =>
|
||||
//{
|
||||
// if (localY == null)
|
||||
// {
|
||||
// localY = transform.localPosition.y;
|
||||
// }
|
||||
// //transform.localPosition.Set(transform.localPosition.x,localY.Value+8, transform.localPosition.z);
|
||||
// //transform.DOLocalMoveY(localY.Value + 8, 0.5f);
|
||||
// //transform.domov(localY+8, 0.5f);
|
||||
//});
|
||||
//UIManager.AddEvent(gameObject, UnityEngine.EventSystems.EventTriggerType.PointerExit, (Base) =>
|
||||
//{
|
||||
// //transform.localPosition.Set(transform.localPosition.x, localY.Value, transform.localPosition.z);
|
||||
// //transform.DOLocalMoveY(localY.Value, 0.5f);
|
||||
//});
|
||||
|
||||
//UIManager.AddEvent(transform.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, (Base) =>
|
||||
//{
|
||||
// App.RouteIdParam = myMap.Id;
|
||||
// if (!App.MainSceneParam.ContainsKey("Name"))
|
||||
// {
|
||||
// App.MainSceneParam.Add("Name", "MapListPanel");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// App.MainSceneParam["Name"] = "MapListPanel";
|
||||
// }
|
||||
// SceneManager.LoadScene("Ride");
|
||||
//});
|
||||
|
||||
if (!isModal)
|
||||
{
|
||||
transform.GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
@@ -144,7 +110,6 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
SetActive4Button(false);
|
||||
|
||||
var isRecent = myMap.RecentRecord != null && myMap.RecentRecord.ContinueCyclingParam != null && !isModal;
|
||||
//var isRecent = App.CurrentRouteType == "Recent Routes" && myMap.RecentRecord != null && myMap.RecentRecord.ContinueCyclingParam != null && !isModal;
|
||||
transform.Find("BtnContinue").gameObject.SetActive(isRecent);
|
||||
transform.Find("BtnReride").gameObject.SetActive(isRecent);
|
||||
transform.Find("MapHBImg").gameObject.SetActive(!isRecent);
|
||||
@@ -173,7 +138,8 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
App.MainSceneParam["Name"] = "MapListPanel";
|
||||
}
|
||||
}
|
||||
SceneManager.LoadScene("Ride");
|
||||
//判断是否启用了AR骑行
|
||||
UIManager.LoadRide(map.EnableAR);
|
||||
}
|
||||
});
|
||||
transform.Find("BtnReride").GetComponent<Button>().onClick.AddListener(Ride);
|
||||
@@ -274,19 +240,7 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
}
|
||||
}
|
||||
//判断是否启用了AR骑行
|
||||
if (map.EnableAR)
|
||||
{
|
||||
SceneManager.LoadScene("VideoPlay");
|
||||
}
|
||||
else
|
||||
{
|
||||
SceneManager.LoadScene("Ride");
|
||||
}
|
||||
//foreach (var item in Utils.propTextureCache)
|
||||
//{
|
||||
// DestroyImmediate(item.Value);
|
||||
//}
|
||||
//Utils.propTextureCache.Clear();
|
||||
UIManager.LoadRide(map.EnableAR);
|
||||
}
|
||||
|
||||
private void Info()
|
||||
|
||||
@@ -202,7 +202,15 @@ public class RouteItem : MonoBehaviour
|
||||
App.routeResult = null;//routeResult;
|
||||
//App.routeResult.ContinueCyclingParam = null;
|
||||
RecordFromUrl();
|
||||
SceneManager.LoadScene("Ride");
|
||||
if (routeResult.LastFrame.HasValue)
|
||||
{
|
||||
SceneManager.LoadScene("VideoPlay");
|
||||
}
|
||||
else
|
||||
{
|
||||
SceneManager.LoadScene("Ride");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
private void RecordFromUrl()
|
||||
|
||||
Reference in new issue
Block a user