public JobTreeItem(int id, ILoadStatus op) { this.id = id; this.displayName = op.ToString(); this.Category = op.GetType().Name; this.IsDispose = op.IsDisposed; this.IsCanceled = op.IsCanceled; this.IsRunning = op.IsRunning; this.IsError = op.IsError; this.IsFinish = op.IsFinish; this.IsComplete = op.IsCompleted; this.Progress = op.Progress; }
public static void LoadLevel(int index) { level = index; AsyncOperation op = SceneManager.LoadSceneAsync("Space"); GameObject loadIndicator = (GameObject)Resources.Load("Prefabs/LoadStatus"); ILoadStatus st = ((GameObject)Instantiate(loadIndicator)).GetComponent <ILoadStatus>(); op.allowSceneActivation = true; op.priority = 15; st.loading = op; }
private void Load() { AsyncOperation op; if (level > 2) { string name = IGame.buffer.currentLocationName; op = SceneManager.LoadSceneAsync(name); } else { op = SceneManager.LoadSceneAsync(level); } GameObject loadIndicator = (GameObject)Resources.Load("Prefabs/LoadStatus"); ILoadStatus st = ((GameObject)Instantiate(loadIndicator)).GetComponent <ILoadStatus>(); op.priority = 15; op.allowSceneActivation = true; st.loading = op; }
private static void FindMinLoad(ref NetWorkType choiceNet, ref ILoadStatus loadQuery, ref float afterUseAddLoad, float tempLoad, NetWorkType net, ILoadStatus temploadQuery) { if (tempLoad < afterUseAddLoad) { afterUseAddLoad = tempLoad; loadQuery = temploadQuery; choiceNet = net; } }