Map

Class in Nostalgia / Inherits from: UnityEngine.MonoBehaviour

Description

Components of 2D tile map.And it may be attached to a GameObject.

Properties

Property Name Description
cellCount Get the number of Cells.
chunkCount Get the number of chunks.
color Gets or sets the material color.
edgeCombine Whether or not to combine auto tiles with map edges
height Gets the height.
isCanvas Whether to render to a Canvas.When the Map game object has RectTransform, it is in Canvas mode.
mapColliderCount Get the number of MapColliders.
material Gets the material.
sortingLayerID Gets or sets the sortingLayerID.
sortingOrder Gets or sets the sortingOrder.
stampCount Get the number of stamps.
tileSet Gets / Sets the tile set.
width Gets the width.

Events

Event Name Description
onRepainted Callback event when repainted

Methods

Method Name Description
AllClear Alls the clear.
AllClearAsync Alls the clear.
BucketTile Buckets the tile.
BucketTileAsync Buckets the tile (Async).
ColorBrush Colors the brush.
ColorBrushRectangle Paint a vertex color rectangle specified.
Copy Copy the Map.
CreateStamp To create a stamp
DestroySubComponents Destroies the sub components.Usually, you do not need to call.
FillTile Fills the tile.
FillTileAsync Fills the tile (Async).
GetCell Get the Cell from the index .
GetCellFromCollider Gets the Cell from collider.
GetCellFromWorldPos Gets the cell from world position.
GetChunk Get the chunk from the index .
GetMapCollider Get the MapCollider from the index .
GetStamp Get the chunk from the index .
GetTile Gets the tile.
IndexOfStamp Get the index from the Stamp.
InsertCell To insert cells.
LocalPointToMapPoint Locals the point to map point.
MapPointToLocalPoint Maps the point to local point.
MapPointToWorldPoint Maps the point to world point.
PutStamp Fills the tile from stamp.
PutTile Puts the tile.
Raycast Raies to local point.
RayToPoint Raies to point.
Refresh Refresh this instance.Please Cell if you have updated the TileSet.
RefreshAsync Rebuild the Cell asynchronously.Please call if you have updated the TileSet.
RemoveBucketTile Tile deletion in bucket form.
RemoveBucketTileAsync Tile deletion in bucket form(Async).
RemoveCell To remove cells
RemoveRectangleTile Tile remove of a rectangle specified.
RemoveRectangleTileAsync Tile remove of a rectangle specified (Async).
RemoveStamp To remove the stamp
RemoveTile Removes the tile.
Repaint Repaint
Resize Resize.
SetDirty You set up to rebuild the mesh. Please call when you directly modify the Cell.
TryGetCells Gets the cell where the specified Tile is located.
UpdateAutoTiles Update process of the Cell by auto tile
UpdateCollider To update the status of the Collider of the Cell.
UpdateMapCollider Update MapColliders
WorldPointToMapPoint Worlds the point to map point.

Static Properties

Property Name Description
mapCount Get the number of Maps.

Static Methods

Method Name Description
FindCell Finds the Cell from the world position.
FindCells Find Cell everything in the world coordinates to the specified.
GetMap Get the Map from the index .

Types

Type Name Description
CellResult Class that will contain the result of Map.FindCell ().

Enums

Type Name Description
HorizontalPivot Specifies the pivot in the horizontal direction.Use a Resize().
VerticalPivot Specifies the pivot in the vertical direction.Use a Resize().

Delegates

Type Name Description
OnRepainted Callback delegate when repainted