Search Results for

    Show / Hide Table of Contents

    Class Level

    Handles all aspects to do with the level.

    Inheritance
    Object
    Level
    Namespace: Global
    Assembly: cs.temp.dll.dll
    Syntax
    public class Level : MonoBehaviour

    Methods

    clear()

    Clear the level and its componenets.

    Declaration
    public void clear()

    generate(TerrainSettings, RiverSettings, LakeSettings, WalkpathSettings)

    Responsible for generating the level. It uses the settings to determine how the level is generated.

    Declaration
    public void generate(TerrainSettings terrainSettings, RiverSettings riverSettings, LakeSettings lakeSettings, WalkpathSettings walkpathSettings)
    Parameters
    Type Name Description
    TerrainSettings terrainSettings

    The settings for the terrain generator.

    RiverSettings riverSettings

    The settings for the river generator.

    LakeSettings lakeSettings

    The settings for the lake generator.

    WalkpathSettings walkpathSettings

    The settings for the walkpath generator.

    getGenerationInfo()

    Get all the level generation information.

    Declaration
    public List<string> getGenerationInfo()
    Returns
    Type Description
    List<String>

    A list of level generation steps.

    getGridWorldPosition(Vector2Int)

    Get the world position of a cell on the map.

    Declaration
    public Vector2 getGridWorldPosition(Vector2Int cellPosition)
    Parameters
    Type Name Description
    Vector2Int cellPosition

    The cell to get the world position for.

    Returns
    Type Description
    Vector2

    The world position of the cell.

    getMapZPosition(Vector2)

    Get the z position (depth) at the x,y world position on the map

    Declaration
    public int getMapZPosition(Vector2 worldPos)
    Parameters
    Type Name Description
    Vector2 worldPos

    The world position to find the z value for.

    Returns
    Type Description
    Int32

    The z position (depth) of the world position.

    getRandomTerrainCellPosition()

    Get a random terrain cell position from the map.

    Declaration
    public Vector3Int getRandomTerrainCellPosition()
    Returns
    Type Description
    Vector3Int

    The position of a terrain cell.

    setCameraActive(Boolean)

    Set the active status of the level camera.

    Declaration
    public void setCameraActive(bool value)
    Parameters
    Type Name Description
    Boolean value

    The value to set the level cameras active status to.

    setup(Boolean)

    Used to setup the level and its components.

    Declaration
    public void setup(bool fromInspector = false)
    Parameters
    Type Name Description
    Boolean fromInspector

    Whether or not a call is from the inspector.

    In This Article
    Back to top Project documentation