Highroad Engine v1.3
Classes | Public Types | Public Member Functions | Public Attributes | Properties | List of all members
MoreMountains.Tools.MMTilemapGeneratorLayer Class Reference

A class used to store and edit the data of MMTilemapGenerator layers, which you can use and combine to generate unique and random grids More...

Classes

struct  MMTilemapGeneratorLayerSafeSpot
 A struct used to store safe spots dimensions More...
 

Public Types

enum  FusionModes {
  Normal , NormalNoClear , Intersect , Combine ,
  Subtract
}
 

Public Member Functions

virtual void SetDefaults ()
 This method will set default values, because Unity. More...
 

Public Attributes

string Name = "Layer"
 the name of this layer, doesn't do anything, just used to organize things More...
 
bool Active = true
 whether this layer should be taken into account when generating the final grid More...
 
Tilemap TargetTilemap
 the tilemap on which to paint tiles More...
 
TileBase Tile
 the tile to use to paint on the tilemap More...
 
bool OverrideGridSize = false
 whether or not this layer should paint a grid of a different size than the global one More...
 
int GridWidth = 50
 the new value of the grid width More...
 
int GridHeight = 50
 the new value of the grid height More...
 
MMTilemapGenerator.GenerateMethods GenerateMethod = MMTilemapGenerator.GenerateMethods.Perlin
 the algorithm to use to generate this layer's grid More...
 
bool DoNotUseGlobalSeed = false
 if this is true, global seed won't be used for this layer More...
 
bool RandomizeSeed = true
 whether or not to randomize this layer's seed when pressing Generate More...
 
int Seed = 1
 the dedicated seed of this layer, when not using the global one More...
 
bool Smooth = false
 whether or not to smoothen the resulting grid, gets rid of spikes/isolated points More...
 
bool InvertGrid = false
 whether or not to invert the grid to get the opposite result (filled becomes empty, empty becomes filled) More...
 
FusionModes FusionMode = FusionModes.Normal
 The selected fusion mode. More...
 
bool FullGenerationFilled = true
 in full mode, whether the grid should be full or empty More...
 
int RandomFillPercentage = 50
 in random mode, the percentage of the grid to fill More...
 
int RandomWalkGroundMinHeightDifference = 1
 in random walk ground mode,the minimum height difference between two steps More...
 
int RandomWalkGroundMaxHeightDifference = 3
 in random walk ground mode,the maximum height difference between two steps More...
 
int RandomWalkGroundMinFlatDistance = 1
 in random walk ground mode, the minimum distance that should remain flat More...
 
int RandomWalkGroundMaxFlatDistance = 3
 in random walk ground mode, the maximum distance that should remain flat More...
 
int RandomWalkGroundMaxHeight = 3
 in random walk ground mode, the maximum height of the tallest platfrom, from the bottom of the grid More...
 
int RandomWalkPercent = 50
 in random walk mode, the percentage of the map the walker should try filling More...
 
Vector2Int RandomWalkStartingPoint = Vector2Int.zero
 in random walk mode,the point at which the walker starts, in grid coordinates More...
 
int RandomWalkMaxIterations = 1500
 in random walk mode, the max amount of iterations to run the random on More...
 
int RandomWalkAvoiderPercent = 50
 in random walk avoider mode, the percentage of the grid the walker should try filling More...
 
Vector2Int RandomWalkAvoiderStartingPoint = Vector2Int.zero
 in random walk avoider mode, the point in grid units at which the walker starts More...
 
Tilemap RandomWalkAvoiderObstaclesTilemap
 in random walk avoider mode, the tilemap containing the data the walker will try to avoid More...
 
int RandomWalkAvoiderObstaclesDistance = 1
 in random walk avoider mode,the distance at which the walker should try to stay away from obstacles More...
 
int RandomWalkAvoiderMaxIterations = 100
 in random walk avoider mode,the max amount of iterations this algorithm will iterate on More...
 
Vector2Int PathStartPosition = Vector2Int.zero
 in path mode, the start position of the path More...
 
MMGridGeneratorPath.Directions PathDirection = MMGridGeneratorPath.Directions.BottomToTop
 in path mode, the direction the path should follow More...
 
int PathMinWidth = 2
 in path mode, the minimum width of the path More...
 
int PathMaxWidth = 4
 in path mode, the maximum width of the path More...
 
int PathDirectionChangeDistance = 2
 in path mode, the maximum number of units the path can change direction More...
 
int PathWidthChangePercentage = 50
 in path mode, the chance (in percent) for the path to change width at every step More...
 
int PathDirectionChangePercentage = 50
 in path mode, the chance percentage that the path will take a new direction More...
 
Tilemap CopyTilemap
 in copy mode, the tilemap to copy More...
 
bool BoundsTop = false
 whether or not to force a wall on the grid's top More...
 
bool BoundsBottom = false
 whether or not to force a wall on the grid's bottom More...
 
bool BoundsLeft = false
 whether or not to force a wall on the grid's left More...
 
bool BoundsRight = false
 whether or not to force a wall on the grid's right More...
 
List< MMTilemapGeneratorLayerSafeSpotSafeSpots
 a list of "safe spots" : defined by their start and end coordinates, these areas will be left empty More...
 
bool Initialized = false
 this is only used to initialize the default values in the inspector More...
 

Properties

int[,] Grid [getset]
 the grid generated by this layer More...
 

Detailed Description

A class used to store and edit the data of MMTilemapGenerator layers, which you can use and combine to generate unique and random grids

Member Enumeration Documentation

◆ FusionModes

the various modes of fusion you can use on this layer. Fusion modes will be applied on layers from top to bottom (the last to speak wins) Normal : just generates a grid, default mode NormalNoClear : generates a grid, but doesn't clear it first Intersect : when painting on a target grid that already has content, will only keep the resulting intersection Combine : adds the result of this grid to the existing target Subtract : removes the result of this grid from the existing target

Enumerator
Normal 
NormalNoClear 
Intersect 
Combine 
Subtract 

Member Function Documentation

◆ SetDefaults()

virtual void MoreMountains.Tools.MMTilemapGeneratorLayer.SetDefaults ( )
virtual

This method will set default values, because Unity.

Member Data Documentation

◆ Active

bool MoreMountains.Tools.MMTilemapGeneratorLayer.Active = true

whether this layer should be taken into account when generating the final grid

◆ BoundsBottom

bool MoreMountains.Tools.MMTilemapGeneratorLayer.BoundsBottom = false

whether or not to force a wall on the grid's bottom

◆ BoundsLeft

bool MoreMountains.Tools.MMTilemapGeneratorLayer.BoundsLeft = false

whether or not to force a wall on the grid's left

◆ BoundsRight

bool MoreMountains.Tools.MMTilemapGeneratorLayer.BoundsRight = false

whether or not to force a wall on the grid's right

◆ BoundsTop

bool MoreMountains.Tools.MMTilemapGeneratorLayer.BoundsTop = false

whether or not to force a wall on the grid's top

◆ CopyTilemap

Tilemap MoreMountains.Tools.MMTilemapGeneratorLayer.CopyTilemap

in copy mode, the tilemap to copy

◆ DoNotUseGlobalSeed

bool MoreMountains.Tools.MMTilemapGeneratorLayer.DoNotUseGlobalSeed = false

if this is true, global seed won't be used for this layer

◆ FullGenerationFilled

bool MoreMountains.Tools.MMTilemapGeneratorLayer.FullGenerationFilled = true

in full mode, whether the grid should be full or empty

◆ FusionMode

FusionModes MoreMountains.Tools.MMTilemapGeneratorLayer.FusionMode = FusionModes.Normal

The selected fusion mode.

◆ GenerateMethod

MMTilemapGenerator.GenerateMethods MoreMountains.Tools.MMTilemapGeneratorLayer.GenerateMethod = MMTilemapGenerator.GenerateMethods.Perlin

the algorithm to use to generate this layer's grid

◆ GridHeight

int MoreMountains.Tools.MMTilemapGeneratorLayer.GridHeight = 50

the new value of the grid height

◆ GridWidth

int MoreMountains.Tools.MMTilemapGeneratorLayer.GridWidth = 50

the new value of the grid width

◆ Initialized

bool MoreMountains.Tools.MMTilemapGeneratorLayer.Initialized = false

this is only used to initialize the default values in the inspector

◆ InvertGrid

bool MoreMountains.Tools.MMTilemapGeneratorLayer.InvertGrid = false

whether or not to invert the grid to get the opposite result (filled becomes empty, empty becomes filled)

◆ Name

string MoreMountains.Tools.MMTilemapGeneratorLayer.Name = "Layer"

the name of this layer, doesn't do anything, just used to organize things

◆ OverrideGridSize

bool MoreMountains.Tools.MMTilemapGeneratorLayer.OverrideGridSize = false

whether or not this layer should paint a grid of a different size than the global one

◆ PathDirection

MMGridGeneratorPath.Directions MoreMountains.Tools.MMTilemapGeneratorLayer.PathDirection = MMGridGeneratorPath.Directions.BottomToTop

in path mode, the direction the path should follow

◆ PathDirectionChangeDistance

int MoreMountains.Tools.MMTilemapGeneratorLayer.PathDirectionChangeDistance = 2

in path mode, the maximum number of units the path can change direction

◆ PathDirectionChangePercentage

int MoreMountains.Tools.MMTilemapGeneratorLayer.PathDirectionChangePercentage = 50

in path mode, the chance percentage that the path will take a new direction

◆ PathMaxWidth

int MoreMountains.Tools.MMTilemapGeneratorLayer.PathMaxWidth = 4

in path mode, the maximum width of the path

◆ PathMinWidth

int MoreMountains.Tools.MMTilemapGeneratorLayer.PathMinWidth = 2

in path mode, the minimum width of the path

◆ PathStartPosition

Vector2Int MoreMountains.Tools.MMTilemapGeneratorLayer.PathStartPosition = Vector2Int.zero

in path mode, the start position of the path

◆ PathWidthChangePercentage

int MoreMountains.Tools.MMTilemapGeneratorLayer.PathWidthChangePercentage = 50

in path mode, the chance (in percent) for the path to change width at every step

◆ RandomFillPercentage

int MoreMountains.Tools.MMTilemapGeneratorLayer.RandomFillPercentage = 50

in random mode, the percentage of the grid to fill

◆ RandomizeSeed

bool MoreMountains.Tools.MMTilemapGeneratorLayer.RandomizeSeed = true

whether or not to randomize this layer's seed when pressing Generate

◆ RandomWalkAvoiderMaxIterations

int MoreMountains.Tools.MMTilemapGeneratorLayer.RandomWalkAvoiderMaxIterations = 100

in random walk avoider mode,the max amount of iterations this algorithm will iterate on

◆ RandomWalkAvoiderObstaclesDistance

int MoreMountains.Tools.MMTilemapGeneratorLayer.RandomWalkAvoiderObstaclesDistance = 1

in random walk avoider mode,the distance at which the walker should try to stay away from obstacles

◆ RandomWalkAvoiderObstaclesTilemap

Tilemap MoreMountains.Tools.MMTilemapGeneratorLayer.RandomWalkAvoiderObstaclesTilemap

in random walk avoider mode, the tilemap containing the data the walker will try to avoid

◆ RandomWalkAvoiderPercent

int MoreMountains.Tools.MMTilemapGeneratorLayer.RandomWalkAvoiderPercent = 50

in random walk avoider mode, the percentage of the grid the walker should try filling

◆ RandomWalkAvoiderStartingPoint

Vector2Int MoreMountains.Tools.MMTilemapGeneratorLayer.RandomWalkAvoiderStartingPoint = Vector2Int.zero

in random walk avoider mode, the point in grid units at which the walker starts

◆ RandomWalkGroundMaxFlatDistance

int MoreMountains.Tools.MMTilemapGeneratorLayer.RandomWalkGroundMaxFlatDistance = 3

in random walk ground mode, the maximum distance that should remain flat

◆ RandomWalkGroundMaxHeight

int MoreMountains.Tools.MMTilemapGeneratorLayer.RandomWalkGroundMaxHeight = 3

in random walk ground mode, the maximum height of the tallest platfrom, from the bottom of the grid

◆ RandomWalkGroundMaxHeightDifference

int MoreMountains.Tools.MMTilemapGeneratorLayer.RandomWalkGroundMaxHeightDifference = 3

in random walk ground mode,the maximum height difference between two steps

◆ RandomWalkGroundMinFlatDistance

int MoreMountains.Tools.MMTilemapGeneratorLayer.RandomWalkGroundMinFlatDistance = 1

in random walk ground mode, the minimum distance that should remain flat

◆ RandomWalkGroundMinHeightDifference

int MoreMountains.Tools.MMTilemapGeneratorLayer.RandomWalkGroundMinHeightDifference = 1

in random walk ground mode,the minimum height difference between two steps

◆ RandomWalkMaxIterations

int MoreMountains.Tools.MMTilemapGeneratorLayer.RandomWalkMaxIterations = 1500

in random walk mode, the max amount of iterations to run the random on

◆ RandomWalkPercent

int MoreMountains.Tools.MMTilemapGeneratorLayer.RandomWalkPercent = 50

in random walk mode, the percentage of the map the walker should try filling

◆ RandomWalkStartingPoint

Vector2Int MoreMountains.Tools.MMTilemapGeneratorLayer.RandomWalkStartingPoint = Vector2Int.zero

in random walk mode,the point at which the walker starts, in grid coordinates

◆ SafeSpots

List<MMTilemapGeneratorLayerSafeSpot> MoreMountains.Tools.MMTilemapGeneratorLayer.SafeSpots

a list of "safe spots" : defined by their start and end coordinates, these areas will be left empty

◆ Seed

int MoreMountains.Tools.MMTilemapGeneratorLayer.Seed = 1

the dedicated seed of this layer, when not using the global one

◆ Smooth

bool MoreMountains.Tools.MMTilemapGeneratorLayer.Smooth = false

whether or not to smoothen the resulting grid, gets rid of spikes/isolated points

◆ TargetTilemap

Tilemap MoreMountains.Tools.MMTilemapGeneratorLayer.TargetTilemap

the tilemap on which to paint tiles

◆ Tile

TileBase MoreMountains.Tools.MMTilemapGeneratorLayer.Tile

the tile to use to paint on the tilemap

Property Documentation

◆ Grid

int [,] MoreMountains.Tools.MMTilemapGeneratorLayer.Grid
getset

the grid generated by this layer


The documentation for this class was generated from the following file: