public void ScrollLines(int top, int numlines) { // TODO Check boundaries for (int i = 0; i < numlines; i++) { if (_lines.Count > 0) { if (_lines.Count > top) { _lines.RemoveAt(top); } else { _lines.RemoveAt(0); } } } // TODO Fix up this so I don't have to add lines back in AddLines(); }
internal void RemoveEntity(RawEntity entity) { var idx = IndexOf(entity); foreach (var component in Components.Values) { component.RemoveAt(idx); } entities.RemoveAt(idx); // swapping back the index of the next entity to the previous index if (idx < entities.Count) { entityToIndex.Remove(entity); entityToIndex[entities[idx]] = idx; Parallel.For(idx, entities.Count, updateEntityIndex); } }