public void LoopStart() { if (!refreshed.IsEmpty()) { for (int i = 0, j = refreshed.Size(); j > i; i++) { entityManager.Refresh(refreshed.Get(i)); } refreshed.Clear(); } if (!deleted.IsEmpty()) { for (int i = 0, j = deleted.Size(); j > i; i++) { Entity e = deleted.Get(i); entityManager.Remove(e); } deleted.Clear(); } }