classafFantomMappy::MapViewer

sys::Obj
  afFantomMappy::Viewer
    afFantomMappy::MapViewer

@Js

Renders a MappyMap onto the screen. A MapViewer creates a LayerViewer for each of the Layers in the MappyMap.

Updating the coordinates of a MapViewer also updates the coordinates of all the underlying LayerViewers.

Note that the coordinates of a MapViewer are held independently of the coordinates held by the underlying LayerViewers. i.e. If you were to change the coordinates of the LayerViewers, the coordinates held by the MapViewer would remain unchanged.

coorInBlocks

Source

virtual override Point coorInBlocks

coorInPixels

Source

virtual override Point coorInPixels

draw

Source

virtual override Void draw(Obj gfx, BlockLayer[] blockLayers := ...)

drawPartial

Source

virtual override Void drawPartial(Obj gfx, Rect dirty, BlockLayer[] blockLayers := ...)

layerViewers

Source

LayerViewer[] layerViewers := LayerViewer[,] { private set }

make

Source

new make(MappyMap map, Renderer renderer, Rect viewBounds)

Creates a LayerViewer for each of the Layers in the MappyMap and places the viewing area at the given offset.

map

Source

MappyMap map { private set }

pillarRiserMode

Source

virtual override Bool pillarRiserMode

translateBlocks

Source

virtual override Void translateBlocks(Int x, Int y)

translatePixels

Source

virtual override Void translatePixels(Int x, Int y)

updateAnimBlocks

Source

Void updateAnimBlocks()

A helper method that updates the animation of all the AnimBlocks in the MappyMap