public override void OnActivate(int pinID)
 {
     if (pinID != 0 || ((Behaviour)this).get_enabled())
     {
         return;
     }
     this.mResult = 0;
     if (GameUtility.Config_UseAssetBundles.Value)
     {
         ((Behaviour)this).set_enabled(true);
         CriticalSection.Enter(CriticalSections.Default);
         FlowNode_LoadMasterParam.ThreadStartParam threadStartParam = new FlowNode_LoadMasterParam.ThreadStartParam();
         threadStartParam.self        = this;
         threadStartParam.GameManager = MonoSingleton <GameManager> .Instance;
         threadStartParam.Language    = GameUtility.Config_Language;
         Debug.Log((object)"Starting Thread");
         this.mMutex = new Mutex();
         new Thread(new ParameterizedThreadStart(FlowNode_LoadMasterParam.LoadMasterDataThread)).Start((object)threadStartParam);
     }
     else
     {
         ((Behaviour)this).set_enabled(false);
         this.ActivateOutputLinks(100);
     }
 }
예제 #2
0
        private static void LoadMasterDataThread(object param)
        {
            Debug.Log((object)nameof(LoadMasterDataThread));
            FlowNode_LoadMasterParam.ThreadStartParam threadStartParam = (FlowNode_LoadMasterParam.ThreadStartParam)param;
            Debug.Log((object)"LoadMasterDataThread START");
            int num = -1;

            try
            {
                num = !threadStartParam.GameManager.ReloadMasterData((string)null, (string)null) ? -1 : 1;
            }
            catch (Exception ex)
            {
                Debug.LogException(ex);
            }
            Debug.Log((object)"LoadMasterDataThread END");
            if (threadStartParam.self.mMutex == null)
            {
                return;
            }
            threadStartParam.self.mMutex.WaitOne();
            threadStartParam.self.mResult = num;
            threadStartParam.self.mMutex.ReleaseMutex();
        }