Exemple #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);
     }
 }
Exemple #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);
     }
                            ));
 }
Exemple #3
0
 void Awake()
 {
     m_Instence = this;
     initialized = true;
 }
Exemple #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);
     }
 }
Exemple #5
0
 void Awake()
 {
     m_Instence  = this;
     initialized = true;
 }