classafFantomMappy::Layer

sys::Obj
  afFantomMappy::Layer

@Js

Represents one of the layers in a MappyMap. See LayerViewer for details on rendering a Layer to the screen.

animBlockAt

Source

AnimBlock animBlockAt(Int blockX, Int blockY)

Returns the AnimBlock at the given block coordinates.

If the block is not an AnimBlock an ArgErr is thrown.

blockAt

Source

Block blockAt(Int blockX, Int blockY)

Returns the Block at the given block coordinates.

If the block is an animation block then the current block in the anim sequence is returned.

collisionAt

Source

BlockCorner? collisionAt(Int pixelX, Int pixelY)

Performs a collision detection test at the given pixel coordinates using the Blocks collision flags. Returns null if n collision occurred.

isAnimBlock

Source

Bool isAnimBlock(Int blockX, Int blockY)

Checks if the block at the given coordinates is an AnimBlock.

isCollisionAt

Source

Bool isCollisionAt(Int pixelX, Int pixelY)

Performs a collision detection test at the given pixel coordinates using the Blocks collision flags.

make

Source

new make(MapHeader mapHeader, LayerData layerData, Block[] blocks, AnimBlock[] animBlocks)

Creates a Layer.

sizeInBlocks

Source

const Size sizeInBlocks

The size of the layer in blocks.

sizeInPixels

Source

const Size sizeInPixels

The size of the layer in pixels.