Adding 9 Player level
This commit is contained in:
parent
fdada6f132
commit
a7be12fa9b
30 changed files with 45984 additions and 300 deletions
|
|
@ -157,13 +157,13 @@ namespace TD.Levels
|
|||
|
||||
if (!initialized) return;
|
||||
|
||||
// Convert tile-corner indices to world-space corners. Tiles are center-based with
|
||||
// TILE_SIZE = 1, so a tile at (x,y) spans world XZ from (x-0.5, y-0.5) to (x+0.5, y+0.5).
|
||||
float halfTile = GridCoordinates.TILE_SIZE * 0.5f;
|
||||
Vector3 sw = new Vector3(minTile.x - halfTile, MapBoundsY, minTile.y - halfTile);
|
||||
Vector3 se = new Vector3(maxTile.x + halfTile, MapBoundsY, minTile.y - halfTile);
|
||||
Vector3 ne = new Vector3(maxTile.x + halfTile, MapBoundsY, maxTile.y + halfTile);
|
||||
Vector3 nw = new Vector3(minTile.x - halfTile, MapBoundsY, maxTile.y + halfTile);
|
||||
// Convert tile-corner indices to world-space corners. Tiles are edge-aligned with
|
||||
// TILE_SIZE = 1, so a tile at (x,y) spans world XZ from (x, y) to (x+1, y+1).
|
||||
float tileSize = GridCoordinates.TILE_SIZE;
|
||||
Vector3 sw = new Vector3(minTile.x * tileSize, MapBoundsY, minTile.y * tileSize);
|
||||
Vector3 se = new Vector3((maxTile.x + 1) * tileSize, MapBoundsY, minTile.y * tileSize);
|
||||
Vector3 ne = new Vector3((maxTile.x + 1) * tileSize, MapBoundsY, (maxTile.y + 1) * tileSize);
|
||||
Vector3 nw = new Vector3(minTile.x * tileSize, MapBoundsY, (maxTile.y + 1) * tileSize);
|
||||
|
||||
Color prev = Gizmos.color;
|
||||
Gizmos.color = new Color(1f, 1f, 1f, 0.6f); // muted white
|
||||
|
|
@ -219,8 +219,9 @@ namespace TD.Levels
|
|||
VolumeBase.RasterizeBoundsToTiles(col.bounds, t => set.Add(t));
|
||||
}
|
||||
|
||||
// For each owner, draw perimeter using the general algorithm.
|
||||
float halfTile = GridCoordinates.TILE_SIZE * 0.5f;
|
||||
// For each owner, draw perimeter using the general algorithm. Tile (x,y) spans
|
||||
// world XZ from (x, y) to (x+1, y+1) (edge-aligned, TILE_SIZE = 1).
|
||||
float tileSize = GridCoordinates.TILE_SIZE;
|
||||
|
||||
Color prev = Gizmos.color;
|
||||
foreach (var kv in perOwner)
|
||||
|
|
@ -231,10 +232,10 @@ namespace TD.Levels
|
|||
foreach (var tile in kv.Value)
|
||||
{
|
||||
// World-space corners of this tile.
|
||||
Vector3 sw = new Vector3(tile.x - halfTile, CombinedZoneOutlineY, tile.y - halfTile);
|
||||
Vector3 se = new Vector3(tile.x + halfTile, CombinedZoneOutlineY, tile.y - halfTile);
|
||||
Vector3 ne = new Vector3(tile.x + halfTile, CombinedZoneOutlineY, tile.y + halfTile);
|
||||
Vector3 nw = new Vector3(tile.x - halfTile, CombinedZoneOutlineY, tile.y + halfTile);
|
||||
Vector3 sw = new Vector3(tile.x * tileSize, CombinedZoneOutlineY, tile.y * tileSize);
|
||||
Vector3 se = new Vector3((tile.x + 1) * tileSize, CombinedZoneOutlineY, tile.y * tileSize);
|
||||
Vector3 ne = new Vector3((tile.x + 1) * tileSize, CombinedZoneOutlineY, (tile.y + 1) * tileSize);
|
||||
Vector3 nw = new Vector3(tile.x * tileSize, CombinedZoneOutlineY, (tile.y + 1) * tileSize);
|
||||
|
||||
// For each of the four edges, draw it ONLY if the neighbor across that edge
|
||||
// is not in the covered set (i.e., the edge is on the perimeter).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue