public void SetTileOverGround(HexTile ht, int minRadius) { Func <bool, string, Tile> gt = (bool b, string s) => { return(b ? null : Resources.Load <Tile>(s)); }; bool properSet = false; for (int r = minRadius; r <= generatedRadius; r++) { int count = 0; foreach (Hex h in gen.L1CircleAllEdgePoints(r, new List <Hex>() { })) { HexTile genH = ht + h; properSet = genH.SetTileBlaind(gt(r < sightRadius, til.GetTilePathBlaind(r == sightRadius ? blaindId(r, count) : 0))); properSet |= genH.SetTileWall(gt(r > sightRadius || !(genH).hasWall(), til.GetTilePathWall(genH))); map.Hex2MoveCost.Add(genH, properSet ? MapData.MOVECOST_BLOCKED : MapData.MOVECOST_EMPTY); count++; } } }