Пример #1
0
        IEnumerator OnLoading()
        {
            var done = false;

            LoadingIndicator.On(() => done);

            App.Open();
            yield return(null);

            AppImpl.AudioSources = this.audioSources;
            yield return(null);

            AppImpl.Open();
            yield return(null);

            AppImpl.SetEventSystem(this.mainEventSystem, this.mainInputModule);
            yield return(null);

            this.presentType = Startup.ForceStartPresent;
            if (null == this.presentType)
            {
                var presentFullname = string.Format("Program.Presents.{0}", this.presentName);
                this.presentType = Type.GetType(presentFullname);
            }
            yield return(null);

            this.loaded = true;

            if (null != this.presentType)
            {
                Present.OpenNextPresent(this.presentType, Present.LoadRuleData.Direct, null, () => done = true);
            }
        }
Пример #2
0
            internal void Resume()
            {
                if (this.isResetting)
                {
                    return;
                }

                this.suspended = false;

                if (AppImpl.IsOpened)
                {
                    AppImpl.Resume();
                }

                for (int n = 0, cnt = this.suspendListeners.Count; n < cnt; ++n)
                {
                    var listener = this.suspendListeners[n];
                    if (null != listener)
                    {
                        listener(false);
                    }
                }

                Present.Resume();
            }
Пример #3
0
        void OnDestroy()
        {
            AppImpl.Close();
            App.Close();

            if (this.appObject)
            {
                GameObject.Destroy(this.appObject);
            }
            this.appObject = null;
        }
Пример #4
0
        public static void Reset()
        {
            if (App.IsOpened)
            {
                App.Singleton.MarkAsResetting();
            }

            if (AppImpl.IsOpened)
            {
                AppImpl.Reset();
            }

            Restart.Open();
        }
Пример #5
0
            internal void Update()
            {
                if (this.isResetting)
                {
                    return;
                }

                if (AppImpl.IsOpened)
                {
                    AppImpl.Update();
                }

                Present.UpdatePresent();
            }