World - Megasploot/Dungeondraft GitHub Wiki
Overview
World is the class where information about the map itself is contained stored.
Properties
String Title
Gets the map title.
int Width
Gets the width of the map in tiles.
int Height
Gets the height of the map in tiles.
int GridSize
Gets the size in pixels of a grid unit. By default, unchanged from 256.
int TileSize
Gets the size in pixels of a tile texture. By default, unchanged from 256.
Vector2 Dimensions
Gets the width and height of the map in tiles.
Vector2 WoxelDimensions
Gets the width and height of the map in pixels. These are world pixels, not the final exported pixels.
Rect2 WorldRect
Gets a Rect2 of the map in world space. One unit in world space is equivalent to the world pixels.
Vector2 GridCellSize
Gets a Vector2 of the grid size.
int CurrentLevelId
Get the current map level number.
Functions
Level GetLevelByID(int id)
Returns the Level data of Level number id. The starting level is usually 0.
Node GetNodeByID(int id)
Returns an Asset Instance by its id.
bool DeleteNodeByID(int id)
Tries to delete an Asset Instance by its id. Returns true if it succeeds.