private void UpdateTile(IMapGrid grid, MapIndices position) { var tile = grid.GetTile(position); var tileDef = (ContentTileDefinition)_tileDefinitionManager[tile.Tile.TileId]; foreach (var snapGridComponent in grid.GetSnapGridCell(position, SnapGridOffset.Center)) { var entity = snapGridComponent.Owner; if (!entity.HasComponent <SubFloorHideComponent>() || !entity.TryGetComponent(out ISpriteComponent spriteComponent)) { continue; } spriteComponent.Visible = tileDef.IsSubFloor; } }