AI/Animals/Animal.Prefab.cs
namespace HC3;
public partial class Animal : ISceneMetadata
{
/// <summary>
/// Get a list of uninstantiated animal prefab files
/// </summary>
public static IEnumerable<GameObject> AllPrefabs
{
get
{
return ResourceLibrary.GetAll<PrefabFile>()
.Where( x => x.GetMetadata( "Type", "" ).Equals( "Animal" ) )
.ToList()
.Select( x => GameObject.GetPrefab( x.ResourcePath ) );
}
}
Dictionary<string, string> ISceneMetadata.GetMetadata()
{
return new()
{
{ "Type", "Animal" }
};
}
}