Decorator

Decorator

Abstract base class for terrain decorators.

A decorator wraps another terrain and augments its behavior. It uses the template-method pattern: the base class delegates all terrain callbacks to the wrapped terrain first, then calls *Internal hook methods for the decorator subclass.

The wrapped terrain's flags, name, and symbol are inherited unless overridden.

Constructor

new Decorator(terrain, name, flags, color, symbol)

Source:
Parameters:
Name Type Description
terrain Terrain

wrapped terrain

name string

override name, or null to inherit from terrain

flags number

flag mask (use 0 to inherit from terrain)

color string

color (use null to inherit from terrain)

symbol Symbol

symbol (use null to inherit)

Classes

Decorator

Members

terrain :Terrain

Source:
Type:

Methods

getProxiedTerrain()

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

Source: