Engines/FlatRedBallXNA/FlatRedBall/Content/Particle/EmitterSaveList.cs
/// <summary>
/// Returns a List of files referenced by this.
/// </summary>
/// <param name="relativeType">Whether the files should be absolute or relative.</param>
/// <returns>The list of referenced files.</returns>
Returns a List of files referenced by this.
Returns a List of files referenced by this .
public List<string> GetReferencedFiles(RelativeType relativeType)
		{
            if (string.IsNullOrEmpty(this.Name))
            {
                throw new InvalidOperationException("The EmitterSaveList's " +
                    "Name is null.  You must set this to the file associated with " +
                    "this instance.");
            }
			List<string> referencedFiles = new List<string>();
			for (int i = 0; i < this.emitters.Count; i++)
			{
				EmitterSave emitterSave = this.emitters[i];
                if (!string.IsNullOrEmpty(emitterSave.EmissionSettings.Texture))
                {
                    referencedFiles.Add(emitterSave.EmissionSettings.Texture);
                }
                if (!string.IsNullOrEmpty(emitterSave.EmissionSettings.AnimationChains))
                {
                    referencedFiles.Add(emitterSave.EmissionSettings.AnimationChains);
                }
			}
			string directory = FileManager.GetDirectory(this.Name);
			if (relativeType == RelativeType.Absolute)
			{
				for (int i = 0; i < referencedFiles.Count; i++)
				{
                    if (FileManager.IsRelative(referencedFiles[i]))
                    {
                        referencedFiles[i] = directory + referencedFiles[i];
                    }
				}
			}
			return referencedFiles;
		}
public List < string > GetReferencedFiles ( RelativeType relativeType ) { if ( string . IsNullOrEmpty ( this . Name ) ) { throw new InvalidOperationException ( " " + " " + " " ) ; } List < string > referencedFiles = new List < string > ( ) ; for ( int i = 0 ; i < this . emitters . Count ; i ++ ) { EmitterSave emitterSave = this . emitters [ i ] ; if ( ! string . IsNullOrEmpty ( emitterSave . EmissionSettings . Texture ) ) { referencedFiles . Add ( emitterSave . EmissionSettings . Texture ) ; } if ( ! string . IsNullOrEmpty ( emitterSave . EmissionSettings . AnimationChains ) ) { referencedFiles . Add ( emitterSave . EmissionSettings . AnimationChains ) ; } } string directory = FileManager . GetDirectory ( this . Name ) ; if ( relativeType == RelativeType . Absolute ) { for ( int i = 0 ; i < referencedFiles . Count ; i ++ ) { if ( FileManager . IsRelative ( referencedFiles [ i ] ) ) { referencedFiles [ i ] = directory + referencedFiles [ i ] ; } } } return referencedFiles ; }
Returns a List of files referenced by this.
Returns a List of files referenced by this .
// Justin Johnson, 04/2015 - Retired particle blueprint system //if (emitterSave.ParticleBlueprint != null) //{ //    emitterSave.ParticleBlueprint.GetReferencedFiles(referencedFiles); //}
The list of referenced files.
The list of referenced files .
relativeType
RelativeType
Whether the files should be absolute or relative.
Whether the files should be absolute or relative .