Пример #1
0
    void StartDownLoad(AssetDownInfo info)
    {
        HttpDownLoadAsync loadAsync = CreateHttpDownLoad();

        loadAsync.Setup(info);
        loadAsync.StartDownLoad(_current_strategy.GetDownLoadParam(info));
    }
    public override void StartDownLoad()
    {
        VersionInfo info = FileManifestManager.Get <IServerVersionFileManifest>().GetLastVersin();

        if (info == null)
        {
            return;
        }
        if (info.AssetBundleManifestNames == null)
        {
            return;
        }

        for (int i = 0; i < info.AssetBundleManifestNames.Length; i++)
        {
            AssetBundleDownLoadParam param             = new AssetBundleDownLoadParam(info.AssetBundleManifestNames[i]);
            HttpDownLoadAsync        httpDownLoadAsync = CreateHttpDownLoad();

            AssetDownInfo downInfo = new AssetDownInfo();
            downInfo.AssetName       = info.AssetBundleManifestNames[i];
            downInfo.Buffer.ByteSize = int.Parse(info.AssetBundleManifestLengths[i]);
            downInfo.MD5             = info.AssetBundleManifestMD5s[i];
            downInfo.Index           = i;
            _version_index.Add(i);

            httpDownLoadAsync.Setup(downInfo);
            httpDownLoadAsync.StartDownLoad(param);
        }
    }
    public override void StartDownLoad()
    {
        HttpDownLoadAsync httpDownloadAsync = CreateHttpDownLoad();

        httpDownloadAsync.Setup(new AssetDownInfo());
        VersionListDownLoadParam versionListDownLoad = new VersionListDownLoadParam();

        httpDownloadAsync.StartDownLoad(versionListDownLoad);
    }
    public override void StartDownLoad()
    {
        _all_version = _server_version.GetABVersion();
        if (_all_version.Count <= 0)
        {
            base.OnAllDownLoadComplete();
            return;
        }

        for (int i = 0; i < _all_version.Count; i++)
        {
            HttpDownLoadAsync httpDownLoadAsync = CreateHttpDownLoad();

            _data_infos.Add(_all_version[i], new List <AssetDataInfo>());

            httpDownLoadAsync.Setup(NewAssetDownInfo(i));
            httpDownLoadAsync.StartDownLoad(new AssetBundleFileDownLoadParam(_all_version[i]));
        }
    }
    public override void StartDownLoad()
    {
        List <string> versionList = _server_version_list.GetAllVersion();

        if (versionList == null)
        {
            return;
        }

        _all_versions = GetNeedDownVersion(versionList);
        for (int i = 0; i < _all_versions.Count; i++)
        {
            HttpDownLoadAsync httpDownLoadAsync = CreateHttpDownLoad();

            _version_infos.Add(_all_versions[i], null);

            httpDownLoadAsync.Setup(NewAssetDownInfo(i));
            httpDownLoadAsync.StartDownLoad(new VersionDownLoadParam(_all_versions[i]));
        }
    }