示例#1
0
 public virtual void Start()
 {
     try
     {
         CultureInfoUtility.EnsureEnglish();
         Current.Notify_LoadedSceneChanged();
         CheckGlobalInit();
         Action action = delegate
         {
             DeepProfiler.Start("Misc Init (InitializingInterface)");
             try
             {
                 soundRoot = new SoundRoot();
                 if (GenScene.InPlayScene)
                 {
                     uiRoot = new UIRoot_Play();
                 }
                 else if (GenScene.InEntryScene)
                 {
                     uiRoot = new UIRoot_Entry();
                 }
                 uiRoot.Init();
                 Messages.Notify_LoadedLevelChanged();
                 if (Current.SubcameraDriver != null)
                 {
                     Current.SubcameraDriver.Init();
                 }
             }
             finally
             {
                 DeepProfiler.End();
             }
         };
         if (!PlayDataLoader.Loaded)
         {
             Application.runInBackground = true;
             LongEventHandler.QueueLongEvent(delegate
             {
                 PlayDataLoader.LoadAllPlayData();
             }, null, doAsynchronously: true, null);
             LongEventHandler.QueueLongEvent(action, "InitializingInterface", doAsynchronously: false, null);
         }
         else
         {
             action();
         }
     }
     catch (Exception arg)
     {
         Log.Error("Critical error in root Start(): " + arg);
     }
 }
示例#2
0
 private void <Start> m__0()
 {
     this.soundRoot = new SoundRoot();
     if (GenScene.InPlayScene)
     {
         this.uiRoot = new UIRoot_Play();
     }
     else if (GenScene.InEntryScene)
     {
         this.uiRoot = new UIRoot_Entry();
     }
     this.uiRoot.Init();
     Messages.Notify_LoadedLevelChanged();
     if (Current.SubcameraDriver != null)
     {
         Current.SubcameraDriver.Init();
     }
 }
示例#3
0
 public virtual void Start()
 {
     try
     {
         CultureInfoUtility.EnsureEnglish();
         Current.Notify_LoadedSceneChanged();
         Root.CheckGlobalInit();
         Action action = delegate
         {
             this.soundRoot = new SoundRoot();
             if (GenScene.InPlayScene)
             {
                 this.uiRoot = new UIRoot_Play();
             }
             else if (GenScene.InEntryScene)
             {
                 this.uiRoot = new UIRoot_Entry();
             }
             this.uiRoot.Init();
             Messages.Notify_LoadedLevelChanged();
             if (Current.SubcameraDriver != null)
             {
                 Current.SubcameraDriver.Init();
             }
         };
         if (!PlayDataLoader.Loaded)
         {
             LongEventHandler.QueueLongEvent(delegate
             {
                 PlayDataLoader.LoadAllPlayData(false);
             }, null, true, null);
             LongEventHandler.QueueLongEvent(action, "InitializingInterface", false, null);
         }
         else
         {
             action();
         }
     }
     catch (Exception arg)
     {
         Log.Error("Critical error in root Start(): " + arg, false);
     }
 }
示例#4
0
        public virtual void Start()
        {
            Current.Notify_LoadedSceneChanged();
            Root.CheckGlobalInit();
            Action action = delegate
            {
                this.soundRoot = new SoundRoot();
                if (GenScene.InPlayScene)
                {
                    this.uiRoot = new UIRoot_Play();
                }
                else if (GenScene.InEntryScene)
                {
                    this.uiRoot = new UIRoot_Entry();
                }
                this.uiRoot.Init();
                Messages.Notify_LoadedLevelChanged();
                if (Current.SubcameraDriver != null)
                {
                    Current.SubcameraDriver.Init();
                }
            };

            if (!PlayDataLoader.Loaded)
            {
                LongEventHandler.QueueLongEvent(delegate
                {
                    PlayDataLoader.LoadAllPlayData(false);
                }, null, true, null);
                LongEventHandler.QueueLongEvent(action, "InitializingInterface", false, null);
            }
            else
            {
                action();
            }
        }