Feel 5.9.1
The best way to improve your game's feel and make it extra juicy
Loading...
Searching...
No Matches
MoreMountains.Tools.MMGridGeneratorPath Class Reference

Generates a grid with a path in the specified direction. More...

Inheritance diagram for MoreMountains.Tools.MMGridGeneratorPath:
MoreMountains.Tools.MMGridGenerator

Public Types

enum  Directions { TopToBottom , BottomToTop , LeftToRight , RightToLeft }

Static Public Member Functions

static int[,] Generate (int width, int height, int seed, Directions direction, Vector2Int startPosition, int pathMinWidth, int pathMaxWidth, int directionChangeDistance, int widthChangePercentage, int directionChangePercentage)
 Generates a grid with a path in the specified direction.
Static Public Member Functions inherited from MoreMountains.Tools.MMGridGenerator
static int[,] PrepareGrid (ref int width, ref int height)
 Prepares the grid array for use in the generate methods.
static bool SetGridCoordinate (int[,] grid, int x, int y, int value)
 Carves or adds to the grid.
static void DebugGrid (int[,] grid, int width, int height)
 Outputs the contents of a grid.
static int GetValueAtGridCoordinate (int[,] grid, int x, int y, int errorValue)
 Returns the int value at the specified coordinate on a grid.
static int[,] InvertGrid (int[,] grid)
 Inverts the contents of a grid (1 becomes 0, 0 becomes 1)
static int[,] SmoothenGrid (int[,] grid)
 Smoothens a grid to get rid of spikes / isolated points.
static int[,] BindGrid (int[,] grid, bool top, bool bottom, bool left, bool right)
 Adds bounds (walls made of 1) to a grid, on the selected sides.
static int GetAdjacentWallsCount (int[,] grid, int x, int y)
 Returns the amount of adjacent walls for a specific coordinate.

Detailed Description

Generates a grid with a path in the specified direction.

Member Enumeration Documentation

◆ Directions

Enumerator
TopToBottom 
BottomToTop 
LeftToRight 
RightToLeft 

Member Function Documentation

◆ Generate()

int[,] MoreMountains.Tools.MMGridGeneratorPath.Generate ( int width,
int height,
int seed,
Directions direction,
Vector2Int startPosition,
int pathMinWidth,
int pathMaxWidth,
int directionChangeDistance,
int widthChangePercentage,
int directionChangePercentage )
static

Generates a grid with a path in the specified direction.

Parameters
width
height
seed
direction
startPosition
pathMinWidth
pathMaxWidth
directionChangeDistance
widthChangePercentage
directionChangePercentage
Returns

The documentation for this class was generated from the following file:
  • H:/Code/MoreMountains/feel/Assets/Feel/MMTools/Accessories/MMProcedural/MMGridGenerators/MMGridGeneratorPath.cs