Feel  4.3
The best way to improve your game's feel and make it extra juicy
MoreMountains.Tools.MMTilemapGenerator Class Reference

This class will fill a tilemap with the data generated by the combination of its layers More...

Inheritance diagram for MoreMountains.Tools.MMTilemapGenerator:

Public Types

enum  GenerateMethods {
  GenerateMethods.Full, GenerateMethods.Perlin, GenerateMethods.PerlinGround, GenerateMethods.Random,
  GenerateMethods.RandomWalk, GenerateMethods.RandomWalkAvoider, GenerateMethods.RandomWalkGround, GenerateMethods.Path,
  GenerateMethods.Copy
}
 the possible methods that can be used to generate a random grid More...
 

Public Member Functions

virtual void Generate ()
 Generates and renders every layer in the data stack More...
 

Public Attributes

Vector2Int GridWidth = new Vector2Int(50,50)
 The width of the grid, in cells. More...
 
Vector2Int GridHeight = new Vector2Int(50,50)
 the height of the grid, in cells More...
 
MMTilemapGeneratorLayerList Layers
 the list of layers that will be used to generate the tilemap More...
 
int GlobalSeed = 0
 a value between 0 and 1 that will be used by all layers as their random seed. If you generate another map using the same seed, it'll look the same More...
 
bool RandomizeGlobalSeed = true
 whether or not to randomize the global seed every time a new map is generated More...
 
bool SlowRender = false
 turning this to true will (at runtime only) draw the map progressively. This is really just for fun. More...
 
float SlowRenderDuration = 1f
 the duration of the slow render, in seconds More...
 
MMTweenType SlowRenderTweenType = new MMTweenType(MMTween.MMTweenCurve.EaseInOutCubic)
 the tween to use for the slow render More...
 

Protected Member Functions

virtual void GenerateLayer (MMTilemapGeneratorLayer layer)
 Generates a layer grid, and renders it More...
 
virtual void RenderGrid (MMTilemapGeneratorLayer layer)
 Renders the grid with the selected modes to the specified target tilemap More...
 
virtual void OnValidate ()
 Sets default values for all layers More...
 

Protected Attributes

int[,] _grid
 
int _width
 
int _height
 

Detailed Description

This class will fill a tilemap with the data generated by the combination of its layers

Member Enumeration Documentation

◆ GenerateMethods

the possible methods that can be used to generate a random grid

Enumerator
Full 
Perlin 
PerlinGround 
Random 
RandomWalk 
RandomWalkAvoider 
RandomWalkGround 
Path 
Copy 

Member Function Documentation

◆ Generate()

virtual void MoreMountains.Tools.MMTilemapGenerator.Generate ( )
virtual

Generates and renders every layer in the data stack

◆ GenerateLayer()

virtual void MoreMountains.Tools.MMTilemapGenerator.GenerateLayer ( MMTilemapGeneratorLayer  layer)
protectedvirtual

Generates a layer grid, and renders it

Parameters
layer

◆ OnValidate()

virtual void MoreMountains.Tools.MMTilemapGenerator.OnValidate ( )
protectedvirtual

Sets default values for all layers

◆ RenderGrid()

virtual void MoreMountains.Tools.MMTilemapGenerator.RenderGrid ( MMTilemapGeneratorLayer  layer)
protectedvirtual

Renders the grid with the selected modes to the specified target tilemap

Parameters
layer

Member Data Documentation

◆ _grid

int [,] MoreMountains.Tools.MMTilemapGenerator._grid
protected

◆ _height

int MoreMountains.Tools.MMTilemapGenerator._height
protected

◆ _width

int MoreMountains.Tools.MMTilemapGenerator._width
protected

◆ GlobalSeed

int MoreMountains.Tools.MMTilemapGenerator.GlobalSeed = 0

a value between 0 and 1 that will be used by all layers as their random seed. If you generate another map using the same seed, it'll look the same

◆ GridHeight

Vector2Int MoreMountains.Tools.MMTilemapGenerator.GridHeight = new Vector2Int(50,50)

the height of the grid, in cells

◆ GridWidth

Vector2Int MoreMountains.Tools.MMTilemapGenerator.GridWidth = new Vector2Int(50,50)

The width of the grid, in cells.

◆ Layers

MMTilemapGeneratorLayerList MoreMountains.Tools.MMTilemapGenerator.Layers

the list of layers that will be used to generate the tilemap

◆ RandomizeGlobalSeed

bool MoreMountains.Tools.MMTilemapGenerator.RandomizeGlobalSeed = true

whether or not to randomize the global seed every time a new map is generated

◆ SlowRender

bool MoreMountains.Tools.MMTilemapGenerator.SlowRender = false

turning this to true will (at runtime only) draw the map progressively. This is really just for fun.

◆ SlowRenderDuration

float MoreMountains.Tools.MMTilemapGenerator.SlowRenderDuration = 1f

the duration of the slow render, in seconds

◆ SlowRenderTweenType

MMTweenType MoreMountains.Tools.MMTilemapGenerator.SlowRenderTweenType = new MMTweenType(MMTween.MMTweenCurve.EaseInOutCubic)

the tween to use for the slow render


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