ColorRelay

ColorRelay

Re-broadcasts a different color event when it receives its own color event, acting as a color-channel multiplexer.

Typical use: fan out one signal to multiple independent listeners on different color channels, or chain together sequences of color-triggered effects without wiring every cell to the same color.

Constructor

new ColorRelay(terrain, color, relayTo)

Source:
Parameters:
Name Type Description
terrain Terrain

The underlying terrain this decorator wraps.

color Color

The incoming color event that triggers the relay.

relayTo Color

The outgoing color event broadcast to the board.

Extends

Classes

ColorRelay

Members

terrain :Terrain

Source:
Overrides:
Type:

Methods

getProxiedTerrain()

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

Source:
Overrides:

onColorEventInternal(event, color, cell)

Description:
  • Fires ColorRelay#relayTo on the board when the received color matches ColorRelay#color.

Source:
Parameters:
Name Type Description
event GameEvent
color Color
cell Cell