GridGenerator Class
From MyDungeon
MyDungeon Documentation
GridGenerator Class |
Class for generating a pseudo-random grid-based dungeon
SystemObject Object
Component
Behaviour
MonoBehaviour
MyDungeon.DungeonGeneration.GridBasedGeneratorGridGenerator
Component
Behaviour
MonoBehaviour
MyDungeon.DungeonGeneration.GridBasedGeneratorGridGenerator
Namespace: MyDungeon.DungeonGeneration.GridBasedGenerator
Assembly: Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
C#
public class GridGenerator : MonoBehaviour
The GridGenerator type exposes the following members.
| Name | Description | |
|---|---|---|
| GridGenerator | Initializes a new instance of the GridGenerator class |
| Name | Description | |
|---|---|---|
| CreateCorridors |
Creates two connected corridors to connect rooms on the map
| |
| CreateRooms |
Creates the rooms in the map
| |
| GenerateBoard |
Generate a new grid-based dungeon map
| |
| InstantiateFromArray |
Instantiate random prefab from an array of prefabs
| |
| InstantiateHorizontalOuterWall |
Instantiate the horizontal edges of the outer wall
| |
| InstantiateOuterWalls |
Instantiate the outer wall of the map
| |
| InstantiateTiles |
Instantiate all of the objects based on the value in the map array
| |
| InstantiateVerticalOuterWall |
Instantiate the vertical edges of the outer wall
| |
| SetTilesValuesForCorridors |
Adds corridors to the map array
| |
| SetTilesValuesForRooms | Sets values within rooms in map array to create spawn locations for various objects Objects include PlayerDungeon, Exit, Monsters and Items | |
| SetupCells |
Sets the number of cells contained on the map
| |
| SetupTilesArray |
Creates the initial map array filled with impassible terrain
|
| Name | Description | |
|---|---|---|
| Board |
Array representing the map
| |
| BoardHolder |
GameObject that acts as a container for all other tiles
| |
| Cells |
All the cells available in map
| |
| CellSizeH |
The number of rows in a cell
| |
| CellSizeW |
The number of columns in a cell
| |
| Columns |
The number of columns on the board (how wide it will be)
| |
| CorridorLength |
The range of lengths corridors between rooms can have
| |
| Corridors |
All the corridors that connect the rooms
| |
| FloorTiles |
An array of floor tile prefabs
| |
| NumRooms |
The range of the number of rooms there can be
| |
| OuterWallTiles |
An array of outer wall tile prefabs
| |
| RoomHeight |
The range of heights rooms can have
| |
| RoomMinHeight |
The smallest a room's height can be
| |
| RoomMinWidth |
The smallest a room's width can be
| |
| Rooms |
All the rooms that are created for this board
| |
| RoomWidth |
The range of widths rooms can have
| |
| Rows |
The number of rows on the board (how tall it will be)
| |
| Seed |
The seed used to generate the board
| |
| WallTiles |
An array of wall tile prefabs
|
| Name | Description | |
|---|---|---|
| Invoke |
Invoke using a delegate
(Defined by MonoBehaviourExtensions.) |