Nostalgia  2.1.5
Chunk Class Reference

Rendering chunk of Map. More...

Inheritance diagram for Chunk:

Public Member Functions

Cell GetCell (int index)
 Get cell. More...
 
bool HasCells ()
 Has the Nostalgia.Cell. More...
 
void UpdateMesh ()
 Updates the mesh. More...
 

Static Public Member Functions

static Point2 CellPosToChunkPos (Point2 cellPos)
 Convert cell position to chunk position. More...
 
static Point2 CellToChunkPos (Cell cell)
 Convert cell to chunk position. More...
 

Public Attributes

const int chunkWidth = 32
 Number of cells on each side More...
 
Point2 position
 The position. More...
 
bool dirty = false
 The dirty. More...
 

Properties

Map map [get]
 Map to which they belong. More...
 
int cellCount [get]
 Cell count. More...
 
bool hasCells [get]
 Whether this chunk has cells More...
 
int sortingLayerID [get, set]
 Gets or sets the sorting layer ID. More...
 
int sortingOrder [get, set]
 Gets or sets the sorting order. More...
 
Mesh cachedMesh [get]
 

Detailed Description

Rendering chunk of Map.

You do not need to manipulate the chunk basically.

Member Function Documentation

static Point2 CellPosToChunkPos ( Point2  cellPos)
static

Convert cell position to chunk position.

Parameters
cellPosCell position
Returns
Chunk position
static Point2 CellToChunkPos ( Cell  cell)
static

Convert cell to chunk position.

Parameters
cellCell
Returns
Chunk position
Cell GetCell ( int  index)

Get cell.

Parameters
indexThe index of the cell.
Returns
Cell
bool HasCells ( )

Has the Nostalgia.Cell.

Returns
true, if cells was haded, false otherwise.
void UpdateMesh ( )

Updates the mesh.

Member Data Documentation

const int chunkWidth = 32

Number of cells on each side

bool dirty = false

The dirty.

Point2 position

The position.

Property Documentation

Mesh cachedMesh
get
int cellCount
get

Cell count.

bool hasCells
get

Whether this chunk has cells

Map map
get

Map to which they belong.

int sortingLayerID
getset

Gets or sets the sorting layer ID.

The sorting layer ID.

int sortingOrder
getset

Gets or sets the sorting order.

The sorting order.