AR演示版本调优
This commit is contained in:
1 parent
27d18d7d01
commit
df936c4e04
27 files changed
+3143
-2980
No files matched your search
@@ -18,7 +18,7 @@ using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
||||
public class GameRoomMapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler, IPointerUpHandler,IProgress<float>
|
||||
public class GameRoomMapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler, IPointerUpHandler
|
||||
{
|
||||
public class PropNames
|
||||
{
|
||||
@@ -78,7 +78,21 @@ public class GameRoomMapItem : MonoBehaviour, IPointerExitHandler, IPointerEnter
|
||||
downloading.SetActive(true);
|
||||
downloadTxt.SetActive(false);
|
||||
slider.gameObject.SetActive(true);
|
||||
Loom.Download(map);
|
||||
var progress = Progress.Create<float>(x =>
|
||||
{
|
||||
Loom.DownLoadTaskList[map.FileName] = x;
|
||||
slider.value = x;
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate((RectTransform)this.slider.transform);
|
||||
if (x == 1)
|
||||
{
|
||||
transform.Find("DownLoadModal").gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
transform.Find("DownLoadModal").gameObject.SetActive(true);
|
||||
}
|
||||
});
|
||||
Loom.Download(map, progress);
|
||||
});
|
||||
|
||||
transform.Find("Name").GetComponent<Text>().text = myMap.Name;
|
||||
@@ -303,24 +317,4 @@ public class GameRoomMapItem : MonoBehaviour, IPointerExitHandler, IPointerEnter
|
||||
{
|
||||
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
||||
}
|
||||
|
||||
public void Report(float value)
|
||||
{
|
||||
if (gameObject != null)
|
||||
slider.value = value;
|
||||
if (Loom.DownLoadTaskList.ContainsKey(map.FileName))
|
||||
{
|
||||
Loom.DownLoadTaskList[map.FileName] = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
Loom.DownLoadTaskList.Add(map.FileName, value);
|
||||
}
|
||||
|
||||
if (value == 100)
|
||||
{
|
||||
Ride();
|
||||
transform.Find("DownLoadModal").gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user