AnimationManager

AnimationManager

AnimationManager — drives all visual effects at ~12.5 fps using rAF.

Each tick:

  1. Calls player.onFrame(cell) so damage/heal flashes fade
  2. Calls onFrame() on every animated piece via the board's AnimationProxy list (terrain, agents, items, effects including InFlightItem projectiles)

The board and player references are set by the Game controller just before the game loop starts via setContext().