Exemplo 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);
     }
 }
Exemplo 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);
     }
                            ));
 }
Exemplo n.º 3
0
 void Awake()
 {
     m_Instence = this;
     initialized = true;
 }
Exemplo 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);
     }
 }
Exemplo n.º 5
0
 void Awake()
 {
     m_Instence  = this;
     initialized = true;
 }