Constructor
new AnimationProxy(x, y, piece, randomSeed)
- Source:
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
x |
number | ||
y |
number | ||
piece |
object | an agent or terrain with an |
|
randomSeed |
boolean |
true
|
if true, start at a random frame offset |
Classes
Methods
proxyFor()
- Description:
True if this proxy represents the given piece at the given position.
- Source:
setXY()
- Description:
Update position without destroying/recreating the proxy (used when an agent moves to an adjacent cell).
- Source:
tick(event, board)
- Description:
Execute one animation frame: call piece.onFrame with the current counter, then increment it.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
event |
GameEvent | |
board |
Board |