public void Insert(int index, NPCObject value) { if (index < NPCObjects.Count) { NPCObjects.Insert(index, value); } else { NPCObjects.Add(value); } }
public void Insert(int index, Point p) { var e = new NPCObject(); e.X = (byte)p.X; e.Y = (byte)p.Y; if (index < NPCObjects.Count) { NPCObjects.Insert(index, e); } else { NPCObjects.Add(e); } }