Skip to content

FloorTileMap

Extends: TileMap

Description

Properties

Level Level
Vector2 CellSize
int width
int height

Methods

Dictionary Save ( )
void Load ( Dictionary data )
void Resize ( int x, int y, int w, int h )
Dictionary GetUsedTileTextures ( )
void AddRect ( Rect2 rect, bool invertAction )
void UpdateRect ( Rect2 rect )

Property Descriptions

  • Level Level:
    Level in which this floor tile map belongs. Read only.

  • Vector2 CellSize:
    Cached size of a cell. Read only.

  • int width:
    Width of the map in cells. Read only.

  • int height:
    Height of the map in cells. Read only.

Method Descriptions

  • Dictionary Save ( ):
    Save the FloorTileMap into the save file format and return it as a Dictionary. The param copy is only used by copy-pasting feature of Dungeondraft.

  • void Load ( Dictionary data ):
    Load a saved FloorTileMap data. Used by a saved map file to load existing floor tiles.

  • void Resize ( int x, int y, int w, int h ):
    Called automatically when the canvas is resized. DO NOT CALL DIRECTLY. FOR REFERENCE ONLY.

  • Dictionary GetUsedTileTextures ( ):
    Returns a Dictionary of int key - Texture value pairs that indicate the tile id and texture of tiles used in this map.

  • void AddRect ( Rect2 rect, bool invertAction ):
    Draw or erase a region of floor tiles using the FloorShapeTool's SmartTileID property as the tile id.

  • void UpdateRect ( Rect2 rect ):
    Call on the region last modified to visually update the to use the correct Smart tile directions.