TopDown Engine  v4.1
MoreMountains.Tools.MMTilemap Class Reference

A collection of helper methods for interacting with Tilemaps More...

Inheritance diagram for MoreMountains.Tools.MMTilemap:

Static Public Member Functions

static Vector2 GetRandomPosition (Tilemap targetTilemap, Grid grid, int width, int height, bool shouldBeFilled=true, int maxIterations=1000)
 Returns a random world position on the specified tilemap/grid combo, filled or not based on the shouldBeFilled flag More...
 
static Vector2 GetRandomPositionOnGround (Tilemap targetTilemap, Grid grid, int width, int height, int startingHeight, int xMin, int xMax, bool shouldBeFilled=true, int maxIterations=1000)
 Returns a random position on the ground floor of the grid More...
 

Detailed Description

A collection of helper methods for interacting with Tilemaps

Member Function Documentation

◆ GetRandomPosition()

static Vector2 MoreMountains.Tools.MMTilemap.GetRandomPosition ( Tilemap  targetTilemap,
Grid  grid,
int  width,
int  height,
bool  shouldBeFilled = true,
int  maxIterations = 1000 
)
static

Returns a random world position on the specified tilemap/grid combo, filled or not based on the shouldBeFilled flag

Parameters
targetTilemap
grid
width
height
shouldBeFilled
maxIterations
Returns

◆ GetRandomPositionOnGround()

static Vector2 MoreMountains.Tools.MMTilemap.GetRandomPositionOnGround ( Tilemap  targetTilemap,
Grid  grid,
int  width,
int  height,
int  startingHeight,
int  xMin,
int  xMax,
bool  shouldBeFilled = true,
int  maxIterations = 1000 
)
static

Returns a random position on the ground floor of the grid

Parameters
targetTilemap
grid
width
height
startingHeight
xMin
xMax
shouldBeFilled
maxIterations
Returns

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