/// <summary> /// Find/return a resource with index. Null if none found /// </summary> /// <param name="index">Index of the resource to be found</param> /// <returns></returns> public IndexedResource ResourceLookup(int index) { bool found = false; int i = 0; IndexedResource r = null; if (index == RTCore.kInvalidIndex) { return(r); } while ((!found) && (i < mCollection.Count)) { r = mCollection.ElementAt(i); found = (r.GetResourceIndex() == index); i++; } return(r); }
/// <summary> /// Insert /// </summary> /// <param name="r"></param> public void AddResource(IndexedResource r) { mCollection.Add(r); }