public void ClearObjects() { while (ObjectsInView.Count > 0) { ObjectsInView.RemoveAt(ObjectsInView.Count - 1); } Objects.Clear(); }
private void ResetObjectsInView() { while (ObjectsInView.Count > 0) { ObjectsInView.RemoveAt(ObjectsInView.Count - 1); } foreach (var o in Objects.Where(ObjectIsInViewRegion)) { ObjectsInView.Add(o); } }