Exemple #1
0
    void DownloadPlaying()
    {
        DownloadPlayingStageDataFactory strategyFactory = new DownloadPlayingStageDataFactory();

        StageDataBase[] strategyBases = strategyFactory.BuildStrategys();

        if (strategyBases == null || strategyBases.Length <= 0)
        {
            return;
        }

        Debug.Log("边玩边下载包=" + strategyBases.Length);

        ResourcesDownLoad zipDownload = new ResourcesDownLoad(strategyBases);

        zipDownload.StartDownLoad();
        if (_first_view != null)
        {
            GUIS.Remove(_first_view);
            _first_view = null;
        }
        new PackageDownLoadView(zipDownload);

        zipDownload.DownLoadCompleteEvent = (rt) =>
        {
            Updates.Clear();
            GUIS.Clear();
            AssetDownLoads.Clear();
        };
    }
Exemple #2
0
 public PackageDownLoadView(ResourcesDownLoad downLoadBase)
 {
     Updates.Add(this);
     GUIS.Add(this);
     this.downLoadBase      = downLoadBase;
     DownLoadStageResult    = UpdateStageResult.DownLoad;
     CompressionStageResult = UpdateStageResult.Compression;
     resourcesUpdate        = Managers.ResourcesUpdate;
 }
Exemple #3
0
 public void Update()
 {
     if (AssetDownLoads.IsAllDownLoadComplete)
     {
         Debug.Log("全部下载完成!!");
         GUIS.Clear();
         AssetDownLoads.Clear();
         Updates.Clear();
     }
 }
Exemple #4
0
 private void OnGUI()
 {
     GUIS.OnGUIALL();
 }