コード例 #1
0
 private void DoneLoading()
 {
     Bootstrap.IsDone.Value = true;
     if (this.onBootstrapDone != null)
     {
         this.onBootstrapDone.Invoke();
     }
     base.gameObject.SendMessage("OnBootstrapDone", SendMessageOptions.DontRequireReceiver);
     Object.Destroy(base.gameObject);
     if (SceneManager.GetSceneByName("00-bootstrap").isLoaded)
     {
         GameGlobal.UnloadScene("00-bootstrap");
     }
 }
コード例 #2
0
        private void ShowNextScreen()
        {
            int  num  = this.idx;
            bool flag = false;

            while (num < this.screens.Count - 1)
            {
                num++;
                if ((UnityEngine.Object) this.screens[num].target != (UnityEngine.Object)null)
                {
                    flag = true;
                    break;
                }
            }
            if (!flag && this.showTimer > 0.0)
            {
                return;
            }
            if (this.idx >= 0)
            {
                this.screens[this.idx].target.SetActive(false);
                this.onSpashScreenHidden.Invoke(this.idx);
                base.gameObject.SendMessage("bgsOnSpashScreenHidden", this.idx, SendMessageOptions.DontRequireReceiver);
            }
            if (flag)
            {
                this.idx   = num;
                this.timer = this.screens[this.idx].timeout;
                this.screens[this.idx].target.SetActive(true);
                this.onSpashScreenShown.Invoke(this.idx);
                base.gameObject.SendMessage("bgsOnSpashScreenShown", this.idx, SendMessageOptions.DontRequireReceiver);
            }
            else
            {
                base.enabled = false;
                this.idx     = -1;
                this.onSpashScreensDone.Invoke();
                base.gameObject.SendMessage("bgsOnSpashScreensDone", SendMessageOptions.DontRequireReceiver);
                if (this.autoUnloadWhenDone == AutoUnloadOption.GameObject)
                {
                    UnityEngine.Object.Destroy(base.gameObject);
                }
                else if (this.autoUnloadWhenDone == AutoUnloadOption.Scene)
                {
                    GameGlobal.UnloadScene(base.gameObject.scene.buildIndex);
                }
            }
        }