-
Notifications
You must be signed in to change notification settings - Fork 0
Preview Manager
Handles the "preview tile map", which is a transparent tile map in front of the main one that displays a preview of the object currently being placed.
Connecting Systems:
- None
List of features and descriptions within system.
Standard Features:
- Displays a single transparent tile in front of the mouse, corresponding with the currently selected object being placed.
- Preview will be red if the object is not placeable (either being out of bounds or a tile being placed on an entity and vice versa.)
- When moving entities with the cursor, preview is replaced with a fully opaque version of the entity being moved.
Box Brush Mode
- Preview tiles will cover the entire box area when using the box brush tool.
- Preview area will freeze after releasing the mouse, and then clear upon the placement/deletion of the tiles.
- Preview appears red when deleting in a box area.
Name the most important variables, their type, and what their purpose is
-
editorManager: Node2D= A reference to the editor manager. -
toolManager: Node2D= A reference to the tool manager. -
tileSet: TileMapLayer= A reference to the main tile set. -
brushObject: int= The current object selected to be used by tools.
Name of the most important functions, their parameters, and what they do.
-
func update_preview_object(mousePosition: Vector2, prevPosition: Vector2, isRed: bool) -> void: Updates the preview object based on the mousePosition. Will also clear the previous preview based on prevPosition, and sets the preview to be red and invalid if isRed is true. -
func update_box_preview(firstCorner: Vector2, secondCorner: Vector2) -> void: Updates the Box Brush preview object based on the firstCorner and secondCorner, which will fill in the area selected by the user with the selected brushObject.
List and description of upcoming work/risks.
Future Work:
- Implement tiles placed in editor carrying over to play mode
- Implement saving and loading of maps
Risks:
- None.
A place for miscellaneous notes pertaining to this system.
- None.
Resources
Known Issues
Future Work
Globals
Managers
- Main Menu Manager
- Master Manager
- Camera Manager
- Hotkey Manager
- Import Export Manager
- Audio Manager
- Animation Manager
- PopUp Manager
UI
Managers
- Editor Manager
- Tile Manager
- Entity Manager
- Icon Manager
- Preview Manager
- Tool Manager
- Asset Manager
- Custom Cursor Manager
Tiles & Entities
- Grid Lines
- Preview Line
- Tiles & Entities
- Enemies
- Patrolling Enemy
- Flying Enemy
- Shooting Enemy
- Stationary Enemy
- Moving Platform
- Property Editing
Asset Swapping
UI
Managers
Player