Search Results for

    Show / Hide Table of Contents

    Class TerrainSettings

    Holds the settings used for terrain generation.

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

    Constructors

    TerrainSettings()

    Constructor for TerrainSettings. Responsible for setting all the varables randomly.

    Declaration
    public TerrainSettings()

    TerrainSettings(TerrainGenerator.TerrainType, Boolean, Int32, TerrainGenerator.TerrainShape, Int32, Int32, Int32)

    Constructor for TerrainSettings. Responsible for setting all the varables from user options.

    Declaration
    public TerrainSettings(TerrainGenerator.TerrainType tType, bool heightRangeEnabled, int tSize, TerrainGenerator.TerrainShape tShape, int tMinHeight, int tMaxHeight, int tExactHeight)
    Parameters
    Type Name Description
    TerrainGenerator.TerrainType tType

    The type of terrain to be generated.

    Boolean heightRangeEnabled

    Determines if the exact height is used or the minimum and maximum height values.

    Int32 tSize

    The size of terrain.

    TerrainGenerator.TerrainShape tShape

    The shape of the terrain.

    Int32 tMinHeight

    The minimum possible height of the terrain.

    Int32 tMaxHeight

    The maximum possible height of the terrain.

    Int32 tExactHeight

    The exact height of the terrain. Used if height range is not enabled.

    Fields

    heightRangeEnabled

    Determines if the exact height is used or the minimum and maximum height values.

    Declaration
    public readonly bool heightRangeEnabled
    Field Value
    Type Description
    Boolean

    tExactHeight

    The exact height of the terrain. Used if height range is not enabled.

    Declaration
    public readonly int tExactHeight
    Field Value
    Type Description
    Int32

    tMaxHeight

    The maximum possible height of the terrain.

    Declaration
    public readonly int tMaxHeight
    Field Value
    Type Description
    Int32

    tMinHeight

    The minimum possible height of the terrain.

    Declaration
    public readonly int tMinHeight
    Field Value
    Type Description
    Int32

    tShape

    The shape of the terrain.

    Declaration
    public readonly TerrainGenerator.TerrainShape tShape
    Field Value
    Type Description
    TerrainGenerator.TerrainShape

    tType

    The type of terrain to be generated.

    Declaration
    public readonly TerrainGenerator.TerrainType tType
    Field Value
    Type Description
    TerrainGenerator.TerrainType

    Properties

    tSize

    The size of terrain.

    Declaration
    public int tSize { get; }
    Property Value
    Type Description
    Int32

    Methods

    heightRangeIsOnAndInvalid()

    Used to ensure that if the user has specified a range of height, the minimum value is less than the maximum value.

    Declaration
    public bool heightRangeIsOnAndInvalid()
    Returns
    Type Description
    Boolean

    Whether or not the height range is on and is set to valid values.

    updateTerrainSize(Int32)

    When the terrain is generated, the actual size of the level must be updated in the settings.

    Declaration
    public void updateTerrainSize(int tSize)
    Parameters
    Type Name Description
    Int32 tSize

    The actual terrain size used by the terrain generator.

    In This Article
    Back to top Project documentation