Simple implementation to show textboxes on screen. The main purpose is to provide hints to the player about elements/areas of interest.
Dialog manager: singleton entity that handle the presentation to the player if multi-lines dialog. A timer define each textbox lifespan.
TextBox: entity used to show a single line of a dialog
Usage example
The room_trigger entity will leverage the dialog manager to show hints related to rooms still to be solved by the player. For instance, the torch room is considered "solved" as soon as the player acquire the torch.
The player enter the torch room; the room_trigger will show the hint text
The player pick up the torch; the torch will signal that the room is now solved
If the player enter the room again, no hint is shown
The logic is to connect to a signal to switch off the hints for a given room.
Additional changes
thread.tscn and thread.gd: the thread used to start at position (0,0); it now starts wherever the Protagonist node is placed. Moreover, the root node is now just the Line2D node
room_trigger: added logic to show room related hints; if no hints are provided, an empty textbox is shown
torch: added logic to signal when the room is to consider solved.
Overview
Simple implementation to show textboxes on screen. The main purpose is to provide hints to the player about elements/areas of interest.
Dialog manager: singleton entity that handle the presentation to the player if multi-lines dialog. A timer define each textbox lifespan. TextBox: entity used to show a single line of a dialog
Usage example
The room_trigger entity will leverage the dialog manager to show hints related to rooms still to be solved by the player. For instance, the torch room is considered "solved" as soon as the player acquire the torch.
The logic is to connect to a signal to switch off the hints for a given room.
Additional changes