Messenger

Messenger

Displays a modal message to the player when a matching color event is received.

Typical use: deliver narrative text or instructions at a scripted moment — e.g. show a warning when the player triggers a trap, or present lore when a lever is pulled elsewhere on the board.

Constructor

new Messenger(terrain, color, message)

Source:
Parameters:
Name Type Description
terrain Terrain

The underlying terrain this decorator wraps.

color Color

The color event that triggers the message.

message string

The text shown in the modal dialog.

Extends

Classes

Messenger

Members

terrain :Terrain

Source:
Overrides:
Type:

Methods

getProxiedTerrain()

Description:
  • Return the terrain being wrapped (TerrainProxy interface).

Source:
Overrides:

onColorEventInternal(_event, color, _cell)

Description:
  • Shows the modal message when the received color matches Messenger#color.

Source:
Parameters:
Name Type Description
_event GameEvent

Unused.

color Color
_cell Cell

Unused.