Constructor
new Effect(name, frames, color)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | |
frames |
Array.<Symbol> | animation frame symbols |
color |
string |
Classes
Members
currentSymbol
- Description:
Current animation frame symbol.
- Source:
Current animation frame symbol.
isExpired
- Description:
True if this effect has finished animating and should be removed.
- Source:
True if this effect has finished animating and should be removed.
Methods
isAboveAgent() → {boolean}
- Description:
Should this effect render above an agent that occupies the same cell? Override to return true for effects that should appear on top.
- Source:
Returns:
- Type
- boolean
onTick(event, board, cell)
- Description:
Advance the effect by one tick. Called by AnimationManager each animation frame. Override in subclasses to implement movement, spreading, damage, etc.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
event |
GameEvent | |
board |
Board | |
cell |
Cell |