Class WalkpathGenerator
Responsible for creating the walkpaths in the level.
Inherited Members
Namespace: Global
Assembly: cs.temp.dll.dll
Syntax
public class WalkpathGenerator : PathGenerator
Constructors
WalkpathGenerator(SpriteAtlas, List<String>)
The constructor for the WalkpathGenerator. Sets all the tiles according to their types, and set the reference to the level generation info.
Declaration
public WalkpathGenerator(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
numberOfWalkpathsCount
The number of options in the NumberOfWalkpaths enumeration.
Declaration
public static int numberOfWalkpathsCount
Field Value
| Type | Description |
|---|---|
| Int32 |
Methods
getTile()
Gets the walkpath tile to be used based on the type of terrain.
Declaration
public Tile getTile()
Returns
| Type | Description |
|---|---|
| Tile | The walkpath tile. |
populateCells(Map)
Update the map by adding the walkpaths.
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. |
setWalkpathSettings(WalkpathSettings)
Set the reference to the walkpath settings.
Declaration
public void setWalkpathSettings(WalkpathSettings walkpathSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| WalkpathSettings | walkpathSettings | The walkpath settings to set a reference to. |