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
- blockAt
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
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
Bool isAnimBlock(Int blockX, Int blockY)Checks if the block at the given coordinates is an AnimBlock.
- isCollisionAt
Bool isCollisionAt(Int pixelX, Int pixelY)Performs a collision detection test at the given pixel coordinates using the Blocks collision flags.
- make
new make(MapHeader mapHeader, LayerData layerData, Block[] blocks, AnimBlock[] animBlocks)Creates a
Layer.- sizeInBlocks
const Size sizeInBlocksThe size of the layer in blocks.
- sizeInPixels
const Size sizeInPixelsThe size of the layer in pixels.