public void Initialize() { _pool.SetObjectPositionCache(new Dictionary <TilePos, List <Entity> >()); _positionableGroup = _pool.GetGroup(GameMatcher.Position); _positionableGroup.OnEntityAdded += (g, e, i, c) => AddToCache(e, c as PositionComponent); _positionableGroup.OnEntityRemoved += (g, e, i, c) => RemoveFromCache(e, c as PositionComponent); }