TopDown Engine  v3.6
MoreMountains.TopDownEngine.WeightedRandomTile Class Reference

Weighted Random Tiles are tiles which randomly pick a sprite from a given list of sprites and a target location, and displays that sprite. The sprites can be weighted with a value to change its probability of appearing. The Sprite displayed for the Tile is randomized based on its location and will be fixed for that particular location. More...

Inheritance diagram for MoreMountains.TopDownEngine.WeightedRandomTile:

Public Member Functions

override void GetTileData (Vector3Int position, ITilemap tilemap, ref TileData tileData)
 Retrieves any tile rendering data from the scripted tile. More...
 

Public Attributes

WeightedSprite[] Sprites
 The Sprites used for randomizing output. More...
 

Detailed Description

Weighted Random Tiles are tiles which randomly pick a sprite from a given list of sprites and a target location, and displays that sprite. The sprites can be weighted with a value to change its probability of appearing. The Sprite displayed for the Tile is randomized based on its location and will be fixed for that particular location.

Member Function Documentation

◆ GetTileData()

override void MoreMountains.TopDownEngine.WeightedRandomTile.GetTileData ( Vector3Int  position,
ITilemap  tilemap,
ref TileData  tileData 
)

Retrieves any tile rendering data from the scripted tile.

Parameters
positionPosition of the Tile on the Tilemap.
tilemapThe Tilemap the tile is present on.
tileDataData to render the tile.

Member Data Documentation

◆ Sprites

WeightedSprite [] MoreMountains.TopDownEngine.WeightedRandomTile.Sprites

The Sprites used for randomizing output.


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