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