Class LakeGenerator
Responsible for creating the lakes in the level.
Namespace: Global
Assembly: cs.temp.dll.dll
Syntax
public class LakeGenerator
Constructors
LakeGenerator(SpriteAtlas, List<String>)
The constructor for the LakeGenerator. Sets all the tiles according to their types, and set the reference to the level generation info.
Declaration
public LakeGenerator(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
maxLakeSizeCount
The number of options in the MaxLakeSize enumeration.
Declaration
public static int maxLakeSizeCount
Field Value
| Type | Description |
|---|---|
| Int32 |
numberOfLakesCount
The number of options in the NumberOfLakes enumeration.
Declaration
public static int numberOfLakesCount
Field Value
| Type | Description |
|---|---|
| Int32 |
Methods
getTile()
Gets the lake tile to be used based on the type of terrain.
Declaration
public Tile getTile()
Returns
| Type | Description |
|---|---|
| Tile | The lake tile. |
populateCells(Map)
Update the map by adding the lakes.
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. |
setLakeSettings(LakeSettings)
Set the reference to the lake settings.
Declaration
public void setLakeSettings(LakeSettings lakeSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| LakeSettings | lakeSettings | The lake settings to set a reference to. |