Example #1
0
 private void AddToSelfNonSelf(IGameEntity entity)
 {
     if (_filter.IsSyncNonSelf(entity, Self))
     {
         if (_nonSelfEntityMapCache != null)
         {
             _nonSelfEntityMapCache.Add(entity.EntityKey, entity);
         }
     }
     else if (_filter.IsSyncSelf(entity, Self))
     {
         if (_selfEntityMapCache != null)
         {
             _selfEntityMapCache.Add(entity.EntityKey, entity);
         }
     }
 }
 public IEnumerable <KeyValuePair <EntityKey, IGameEntity> > GetNonSelfEntityList(EntityKey self, EntityMap entityMap)
 {
     return(entityMap.Where(entry =>
                            _filter.IsSyncNonSelf(entry.Value, self)
                            ));
 }