Ejemplo n.º 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);
            }
        }