Class RiverGenerator
Responsible for creating the rivers in the level.
Inherited Members
Namespace: Global
Assembly: cs.temp.dll.dll
Syntax
public class RiverGenerator : PathGenerator
Constructors
RiverGenerator(SpriteAtlas, List<String>)
The constructor for the RiverGenerator. Sets all the tiles according to their types, and set the reference to the level generation info.
Declaration
public RiverGenerator(SpriteAtlas atlas, List<string> generationInfo)
Parameters
Type | Name | Description |
---|---|---|
SpriteAtlas | atlas | A SpriteAtlas, holding all the sprites for the project. |
List<String> | generationInfo | A reference to the level generation information for the level. |
Fields
numberOfRiversCount
The number of options in the NumberOfRivers enumeration.
Declaration
public static int numberOfRiversCount
Field Value
Type | Description |
---|---|
Int32 |
Methods
getTile()
Gets the river tile to be used based on the type of terrain.
Declaration
public Tile getTile()
Returns
Type | Description |
---|---|
Tile | The river tile. |
populateCells(Map)
Update the map by adding the rivers.
Declaration
public void populateCells(Map map)
Parameters
Type | Name | Description |
---|---|---|
Map | map | A reference to the Map object, which represents the state of all cells in the level. |
setRiverSettings(RiverSettings)
Set the reference to the river settings.
Declaration
public void setRiverSettings(RiverSettings riverSettings)
Parameters
Type | Name | Description |
---|---|---|
RiverSettings | riverSettings | The river settings to set a reference to. |