public T Find(string name) { BaseResource <T> fileToFind = new BaseResource <T>(ZombieGame.Content, name); int fileIndex = Resources.IndexOf(fileToFind); if (fileIndex == FILE_NOT_FOUND) { throw new RessourceNotFoundException(); } return(Resources[fileIndex].ResourceData); }
public void Add(string path) { BaseResource <T> fileToAdd = new BaseResource <T>(ZombieGame.Content, path); if (!Resources.Contains(fileToAdd)) { fileToAdd.Load(); lock (LockObj) { Resources.Add(fileToAdd); } } }
public bool Equals(BaseResource <T> other) { return(Name == other.Name); }