Beispiel #1
0
        public MyEntity GetEntity(long entityId)
        {
            if (m_index.Remove(entityId))
            {
                var e = m_entities.Remove(entityId).Entity;
                Debug.Assert(e != null);

                return(e);
            }
            return(null);
        }
Beispiel #2
0
 private void ApplyChanges()
 {
     using (_lock.AcquireExclusiveUsing())
     {
         foreach (var x in _updatesToRemove)
         {
             _scheduledUpdates.Remove(new ScheduledUpdate(x, 0, 0), UpdateEquality.Instance);
         }
         _updatesToRemove.Clear();
         foreach (var x in _updatesToAdd)
         {
             _scheduledUpdates.Insert(x, x.NextUpdate);
         }
         _updatesToAdd.Clear();
     }
 }