public void ChangeDepth(int from, int to) { if (Instances.Count > from && Instances.Count > to) { Vex.IInstance temp = Instances[from]; Instances.RemoveAt(from); Instances.Insert(to, temp); } HasSaveableChanges = true; }
public void SwapDepths(int[] from, int[] to) { if (from.Length == to.Length) { for (int i = 0; i < from.Length; i++) { if (Instances.Count > from[i] && Instances.Count > to[i]) { Vex.IInstance temp = Instances[to[i]]; Instances[to[i]] = Instances[from[i]]; Instances[to[i]].Depth = Instances[from[i]].Depth; Instances[from[i]] = temp; Instances[from[i]].Depth = temp.Depth; } } HasSaveableChanges = true; } }