CaveMesh
Extends: MarchingSquaresMesh < MeshInstance2D
Description
Cave Mesh is the visual object that draws the caves for Dungeondraft.
Properties
| Texture | CaveFloor |
| Texture | CaveWall |
| bool | Colorable |
| Level | Level |
| Wall[] | Walls |
| bool | isMeshesDirty |
| bool | IsMeshWorkerBusy |
| Color | GroundColor |
| Color | WallColor |
| BitMap | entranceBitmap |
| BitMap | previousEntranceBitmap |
| bool | IsDigging |
Methods
| void | FinalizeMeshAndBorders ( ) |
| void | CreateNewEntranceBitmap ( ) |
| void | SetEntranceBitmap ( BitMap bitmap ) |
| void | SetGroundColor ( Color color ) |
| void | SetWallColor ( Color color ) |
| void | SetFloorTexture ( Texture floor ) |
| void | SimpleClipWalls ( ) |
| void | FullClipWalls ( ) |
Property Descriptions
- Texture CaveFloor:
Get the cave floor texture. Call SetFloorTexture() to set.
- Texture CaveWall:
Get the cave wall texture.
- bool Colorable:
Get or set if this cave is colorable. Automatically set by Dungeondraft.
- Level Level:
Get the level in which this cave is part of.
- bool isMeshesDirty:
Gets if the mesh has been modified but not yet visually updated.
- bool IsMeshWorkerBusy:
Gets if the mesh is under a heavy workload to update the mesh. Read only.
- Color GroundColor:
Get the color of the ground. Call SetGroundColor() to set.
- Color WallColor:
Get the color of the wall. Call SetWallColor() to set.
- BitMap entranceBitmap:
Get the bitmap that is used to denote blasted open areas.
- BitMap previousEntranceBitmap:
Get the previous version of the blasted open area bitmap. Used only to record undo history.
- bool IsDigging:
Get whether or not the user enabled dig mode.
Method Descriptions
- void FinalizeMeshAndBorders ( ):
Automatically called by OnDrawingEnd() to calculate the mesh. Heavy CPU load.
- void CreateNewEntranceBitmap ( ):
Automatically called to initialize the cave.
- void SetEntranceBitmap ( BitMap bitmap ):
Replace the blasted open area bitmap with another one. Used by undo history.
- void SetGroundColor ( Color color ):
Set the ground color.
- void SetWallColor ( Color color ):
Set the wall color.
- void SetFloorTexture ( Texture floor ):
Set the floor texture.
- void SimpleClipWalls ( ):
Calculate the cave shape and create walls for it when there is no dungeon walls.
- void FullClipWalls ( ):
Calculate the cave shape and create walls for it when there is dungeon walls. Heavy CPU load.