Ejemplo n.º 1
0
        public void Init(FmsOptions options, FmsCallback onReady, FmsCallback onFailed)
        {
            string manifestUrl = "";

            this.environment = options.Env.ToString().ToLower();
            FmsMode mode = options.Mode;

            if (mode != FmsMode.Passthrough)
            {
                if (mode == FmsMode.Versioned)
                {
                    manifestUrl = string.Format("{0}manifest/{1}/{2}/{3}.json", new object[]
                    {
                        options.RemoteRootUrl,
                        options.CodeName,
                        options.Env.ToString().ToLower(),
                        options.ManifestVersion
                    });
                    this.manifestLoader = new VersionedFileManifestLoader(options.Engine);
                }
            }
            else
            {
                this.manifestLoader = new PassthroughFileManifestLoader();
            }
            this.manifestLoader.Load(options, manifestUrl, onReady, onFailed);
        }
 public void Load(FmsOptions options, string manifestUrl, FmsCallback onComplete, FmsCallback onError)
 {
     this.manifest = new PassthroughFileManifest();
     this.manifest.Prepare(options, "");
     Caching.CleanCache();
     onComplete();
 }
Ejemplo n.º 3
0
        public void Prepare(FmsOptions options, string json)
        {
            this.options = options;
            List <string> list  = new List <string>();
            List <string> list2 = new List <string>();
            int           i     = 0;
            int           num   = VersionedFileManifest.allTargets.Length;

            while (i < num)
            {
                string text = VersionedFileManifest.allTargets[i];
                if (text != "wsaplayer")
                {
                    list.Add("assetbundles/" + text + "/");
                    list2.Add("." + text + ".assetbundle");
                }
                i++;
            }
            list2.Add(".json.joe");
            this.ParseHashes(json, list, list2);
            this.ParseVersion(json);
            this.isReady = true;
            this.logger.DebugFormat("Versioned manifest version #{0} is ready with {1} files.", new object[]
            {
                this.version,
                this.hashes.Count
            });
        }
Ejemplo n.º 4
0
 public void Load(FmsOptions options, string manifestUrl, FmsCallback onComplete, FmsCallback onError)
 {
     this.options     = options;
     this.onComplete  = onComplete;
     this.manifestUrl = manifestUrl;
     Service.Get <StaRTSLogger>().DebugFormat("Setting manifestUrl to {0}", new object[]
     {
         manifestUrl
     });
     this.AttemptManifestRequest(0u, null);
 }
 public void Prepare(FmsOptions options, string json)
 {
     this.options = options;
     Service.Get <StaRTSLogger>().Debug("Passthrough manifest is ready.");
 }