Constructor
new Timer(terrain, color, frames)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
terrain |
Terrain | The underlying terrain this decorator wraps. |
color |
Color | The color event broadcast on each tick. |
frames |
number | Interval in animation frames between firings. Values ≤ 0 are clamped to 1. |
Extends
Classes
Methods
getProxiedTerrain()
- Description:
Return the terrain being wrapped (TerrainProxy interface).
- Source:
- Overrides:
onFrame()
- Description:
Called by the AnimationManager on each animation tick. Fires the color event on the board whenever the frame counter is a positive multiple of Timer#_frames.
- Source:
proxy()
- Description:
Returns a new Timer wrapping the given terrain, preserving color and interval.
- Source: