示例#1
0
 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;
 }
示例#2
0
    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;
    }
示例#3
0
    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;
    }
示例#4
0
 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;
     }
 }