Skip to content

Tile Manager

Zay Arriaga edited this page Jun 10, 2026 · 6 revisions

System Summary

The Tile Manager handles the placing and deleting of tiles, whether by the Brush or Box Brush tools.


Connected Systems

List of connecting/parent/subsystems.

Connecting Systems:


Related Controls

List of related controls.

Controls are as listed in the Tool Manager, as this manager simply handles the actual functions after the key presses.


Bugs

List of known bugs. Be descriptive but keep it brief!

  • No Bugs

Feature List / Breakdown of Features

  • Tools: Different tools have different functionality, and each behave in their own way as handled by this manager.
    • Brush: The Brush tool can be clicked or dragged onto the grid space to create or delete tiles. This tool cannot delete entities, nor edit their properties.
    • Box Brush: The Box Brush tool can be dragged on the grid space to fill or delete a specified area. This tool will skip over entities, refusing to fill or delete them.

Important Variables

Name the most important variables, their type, and what their purpose is

  • editorManager: Node2D = An exported reference to the editor manager.

  • toolManager: Node2D = An exported reference to the tool manager.

  • tileSet: TileMapLayer = An exported reference to the main tile set/map.

  • previewTile: TileMapLayer = An exported reference to the preview tile set/map.

  • brushObject: int = An onready variable for the ID of the brush object.

Important Functions

Name of the most important functions, their parameters, and what they do.

  • func place_tile(clickPosition : Vector2) -> void: Places down the selected brush tile on the position that the user clicks, using clickPosition.

  • func delete_tile(clickPosition : Vector2) -> void: Deletes the tile on the position that the user clicks, using clickPosition.

  • func box_place(firstCorner: Vector2, secondCorner: Vector2) -> void: Places all of the tiles within a given firstCorner and secondCorner.

  • func box_delete(firstCorner: Vector2, secondCorner: Vector2) -> void: Deletes all the tiles within a given firstCorner and secondCorner.


Future Work / Risks

List and description of upcoming work/risks.

Future Work:

  • None

Risks:

  • None as of right now.

Clone this wiki locally