Esempio n. 1
0
 static void Initialize()
 {
     if (!initialized)
     {
         if (!Application.isPlaying)
         {
             return;
         }
         initialized = true;
         var g = new GameObject("ThreadMgr");
         m_Instence = g.AddComponent <ThreadMgr>();
         DontDestroyOnLoad(g);
     }
 }
Esempio n. 2
0
 void BeginDownload(string url, string file)
 {
     m_CurDownloadNum++;
     ThreadMgr.RunAsync(new TheardEvent(
                            () => {
         HttpDownFile down = new HttpDownFile(file, url);
         down.DownloadFile();
     }
                            , () => {
         m_CurDownloadNum--;
         m_DownloadFiles.Add(file);
     }
                            ));
 }
Esempio n. 3
0
 void Awake()
 {
     m_Instence = this;
     initialized = true;
 }
Esempio n. 4
0
 static void Initialize()
 {
     if (!initialized)
     {
         if (!Application.isPlaying)
             return;
         initialized = true;
         var g = new GameObject("ThreadMgr");
         m_Instence = g.AddComponent<ThreadMgr>();
         DontDestroyOnLoad(g);
     }
 }
Esempio n. 5
0
 void Awake()
 {
     m_Instence  = this;
     initialized = true;
 }