This document shouldn't exist and will hopfully be deleted after some refactorings.
There are two:
src/index.js
: for the open arenasrc/iso/game.js
: for the iso path arena
- Object tree root (has drawables, goons, grid)
- Control game loop
- (Need to move) Calculate paths
- Grid data structure (Cell[][])
- Has cells, provide access to cells
- Has
draw(context)
method- Uses GameSheet to draw tiles and objects stored in cells
- Get drawables from grid and call draw
- Map sprite key to landscape-sheet.js or towers-grey-sheet.js
- Has 2 instances of SpriteSheet for landscape-sheet.js and towers-grey-sheet.js
- Has
draw(context)
method- Delegate draw calls to SpriteSheet
- Has a reference to a sprite image file and it's map
- Has
draw(context)
method (and drawStacked) - Scale tile before drawing (scaleToFit)
- Move landscape-sheet.js and towers-grey-sheet.js to config
- Merge SpriteSheet and GameSheet