Beispiel #1
0
        private WWWHelper CreateDownLoader(DownLoadResType resType)
        {
            GameObject go = new GameObject();

            go.name = "ResDownLoader";
            WWWHelper loader = null;

            switch (resType)
            {
            case DownLoadResType.Null:
                loader = go.AddComponent <WWWHelper>();
                break;

            case DownLoadResType.Image:
                loader = go.AddComponent <ResImageDownLoader>();
                break;

            default:
                break;
            }
            return(loader);
        }
Beispiel #2
0
 public void DestroyDownLoader(WWWHelper loader)
 {
     ResDownLoaderList.Remove(loader);
     loader.Destroy();
 }
Beispiel #3
0
        public void DownLoad(string url, DownLoadResType resType, Action <DownLoadResDesc> callBack)
        {
            WWWHelper loader = CreateDownLoader(resType);

            loader.DownLoad(url, callBack);
        }