Constructor
new Mimic(appearsAs, actual, color)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
appearsAs |
Terrain | The terrain whose symbol is shown to the player. |
actual |
Terrain | The terrain that governs behavior and traversal. |
color |
Color | Color used by the underlying Decorator. |
Extends
Classes
Members
terrain :Terrain
- Source:
- Overrides:
Type:
Methods
getApparentTerrain()
- Description:
Returns the visual terrain (the one whose symbol is displayed).
- Source:
getProxiedTerrain()
- Description:
Returns the behavioral terrain (the one being wrapped).
- Source:
- Overrides:
onAdjacentToInternal(event, cell)
- Description:
When the player enters an adjacent cell and has DETECT_HIDDEN, swaps the cell's animation symbol to reveal the actual terrain.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
event |
GameEvent | |
cell |
Cell |
onNotAdjacentToInternal(_event, cell)
- Description:
When the player leaves the adjacent position, restores the cell's animation symbol so the disguise is shown again.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
_event |
GameEvent | Unused. |
cell |
Cell |