Added black Loading Sphere
This commit is contained in:
@@ -2,6 +2,7 @@ using GhostSystem;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using TMPro;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class FlushAndLoad : MonoBehaviour
|
||||
{
|
||||
@@ -13,11 +14,13 @@ public class FlushAndLoad : MonoBehaviour
|
||||
private void OnEnable()
|
||||
{
|
||||
GhostRecorderBatch.OnUploadFinished += HandleUploadFinished;
|
||||
RoomManager.OnSceneIdReady += HandleSceneIdReady;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
GhostRecorderBatch.OnUploadFinished -= HandleUploadFinished;
|
||||
RoomManager.OnSceneIdReady -= HandleSceneIdReady;
|
||||
}
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
@@ -31,17 +34,27 @@ public class FlushAndLoad : MonoBehaviour
|
||||
{
|
||||
if (OVRInput.GetDown(OVRInput.Button.SecondaryIndexTrigger))
|
||||
{
|
||||
output.text = "Flush...\n\r" + output.text;
|
||||
output.text = "Flush...";
|
||||
loadingScreen.SetActive(true);
|
||||
canvas.SetActive(false);
|
||||
|
||||
recorder.Flush();
|
||||
GetComponent<SceneLoader>().NewRoom();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleUploadFinished()
|
||||
{
|
||||
loadingScreen.SetActive(false);
|
||||
output.text = "";
|
||||
}
|
||||
|
||||
private void HandleSceneIdReady(string id, List<GameObject> doors)
|
||||
{
|
||||
if (id == "Room1")
|
||||
{
|
||||
loadingScreen.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user