Skip to content

Entity Manager

Andrew Hernandez edited this page Jun 30, 2026 · 6 revisions

System Summary

The Entity Manager handles the creation, deletion, moving, and opening of the property menu for entities.


Connected Systems

List of connecting/parent/subsystems.

Parent Systems:

Connecting Systems:


Related Controls

List of related controls.

Controls are as listed in the Tool Manager, as this manager only handles the functionality post key press.


Bugs

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

  • Empty cells can be moved and break the cursor tool.

Feature List / Breakdown of Features

  • Cursor Tool: The Cursor tool can be clicked on the grid to place or delete entities. When clicking on an entity, it will also open up the property menu, allowing for specific properties to be tweaked freely. It can also be held on an entity to drag them around on the grid.

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.

  • propertyMenu : Panel = An exported reference to the property menu.

  • tileMap : TileMapLayer = An exported reference to the editor state's tile map.

  • goalCount : int = 0 = The amount of goal entities currently in the level.

  • movingResource : Resource = The property file pertaining to the entity being moved.

Important Functions

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

  • func _ready() -> void: Runs upon node creation. Connects a function to the global level creation signal that resets goalCount to 0.

  • func _process(_delta: float) -> void: Runs every frame in the editor state. Synchronizes goalCount to Editor Manager's goalExists.

  • func place_entity(clickPosition: Vector2) -> void: Places an entity at the clicked position. Extra steps are taken depending on the entity type. Enemies will have new property files instantiated, and props will have their rotation applied.

  • func delete_entity(clickPosition: Vector2) -> void: Deletes an entity at the clicked position. Deleted enemies will have their corresponding property files removed.

  • func edit_properties(clickPosition: Vector2) -> void: Opens the property menu for the selected entity for editing. Only works on the player or enemies.

  • func move_entity(previousClickPos: Vector2) -> void: Stores the info on the clicked entity for moving. Enemy properties are stored in movingResource.

  • func drop_entity() -> void: Drops the entity being moved at the mouse's current position. Returns the entity to its original spot if dropping out of bounds or on another object.


Future Work / Risks

List and description of upcoming work/risks.

Future Work:

  • None.

Risks:

  • None as of right now.

Clone this wiki locally