public static void AddQuadTrans(ref Classes.Quad quad) { // Need to add them in order. int z = quad.Order; if (quadsTrans.Count == 0) { quadsTrans.AddFirst(quad); } else { bool done = false; // Thiiiiis... doesn't seem to work. for (int i = 0; i < quadsTrans.Count; i++) { if (z >= quadsTrans.ElementAt(i).Order) { LinkedListNode <Classes.Quad> current = quadsTrans.Find(quadsTrans.ElementAt(i)); quadsTrans.AddBefore(current, quad); done = true; break; } } if (!done) { quadsTrans.AddLast(quad); } } }
public static void AddQuad(ref Classes.Quad quad) { quads.Add(quad); }