Raymond Maarloeve
Loading...
Searching...
No Matches
MapGenerator Class Reference

Responsible for generating the game map, including terrain layout, building placement, wall construction, decoration, and clues. More...

Public Member Functions

void GenerateMap ()
 Generates the full map including walls, buildings, decorations, and paths.
 
void GenerateClue ()
 Spawns clues randomly on the generated map.
 
GameObject GetBuilding (HashSet< BuildingData.BuildingType > allowedTypes)
 Returns a suitable building for an NPC from allowed types.
 
void DebugTilesInConsole ()
 Prints tile layout information to the Unity console for debugging purposes.
 

Public Attributes

NavMeshSurface surface
 
Terrain terrain
 
int tileSize = 10
 
int mapWidthInTiles = 10
 
int mapLengthInTiles = 10
 
float buildingsDensity = 0.2f
 
bool markTiles = false
 
int WallsMargin = 10
 
List< BuildingSetupbuildings = new()
 
List< WallsSetupwalls = new()
 
List< BuildingSetupdecorations = new()
 
List< ClueSetupclues = new()
 
List< TilebuildingsMainTile
 
List< GameObject > spawnedBuildings
 
int mapWidth
 
int mapLength
 

Properties

static MapGenerator Instance [get]
 Singleton instance of the MapGenerator.
 
bool IsMapGenerated = false [get]
 Indicates whether the map has already been generated.
 

Detailed Description

Responsible for generating the game map, including terrain layout, building placement, wall construction, decoration, and clues.

Member Function Documentation

◆ DebugTilesInConsole()

void MapGenerator.DebugTilesInConsole ( )

Prints tile layout information to the Unity console for debugging purposes.

◆ GenerateClue()

void MapGenerator.GenerateClue ( )

Spawns clues randomly on the generated map.

◆ GenerateMap()

void MapGenerator.GenerateMap ( )

Generates the full map including walls, buildings, decorations, and paths.

◆ GetBuilding()

GameObject MapGenerator.GetBuilding ( HashSet< BuildingData::BuildingType allowedTypes)

Returns a suitable building for an NPC from allowed types.

Parameters
allowedTypesSet of allowed building types.
Returns
Available building GameObject or null.

Member Data Documentation

◆ buildings

List<BuildingSetup> MapGenerator.buildings = new()

◆ buildingsDensity

float MapGenerator.buildingsDensity = 0.2f

◆ buildingsMainTile

List<Tile> MapGenerator.buildingsMainTile

◆ clues

List<ClueSetup> MapGenerator.clues = new()

◆ decorations

List<BuildingSetup> MapGenerator.decorations = new()

◆ mapLength

int MapGenerator.mapLength

◆ mapLengthInTiles

int MapGenerator.mapLengthInTiles = 10

◆ mapWidth

int MapGenerator.mapWidth

◆ mapWidthInTiles

int MapGenerator.mapWidthInTiles = 10

◆ markTiles

bool MapGenerator.markTiles = false

◆ spawnedBuildings

List<GameObject> MapGenerator.spawnedBuildings

◆ surface

NavMeshSurface MapGenerator.surface

◆ terrain

Terrain MapGenerator.terrain

◆ tileSize

int MapGenerator.tileSize = 10

◆ walls

List<WallsSetup> MapGenerator.walls = new()

◆ WallsMargin

int MapGenerator.WallsMargin = 10

Property Documentation

◆ Instance

MapGenerator MapGenerator.Instance
staticget

Singleton instance of the MapGenerator.

◆ IsMapGenerated

bool MapGenerator.IsMapGenerated = false
get

Indicates whether the map has already been generated.


The documentation for this class was generated from the following file: