Example #1
0
        /// <summary>
        /// Expands the target files.
        /// </summary>
        /// <param name="assetManager">The current AssetManager instance.</param>
        public virtual void ExpandFiles(IAssetManager assetManager)
        {
            List <AssetLocation> expandedFiles = new List <AssetLocation>();

            for (int i = 0; i < Files.Length; i++)
            {
                AssetLocation fileLocation = Files[i];
                if (fileLocation.Path.EndsWith("*"))
                {
                    List <AssetLocation> locations = assetManager.GetLocations("music/" + fileLocation.Path.Substring(0, fileLocation.Path.Length - 1), fileLocation.Domain);

                    foreach (var location in locations)
                    {
                        expandedFiles.Add(location);
                    }
                }
                else
                {
                    expandedFiles.Add(fileLocation);
                }
            }

            Files = expandedFiles.ToArray();
        }