Tile sets

Forgot to mention that the bHive.Bitmap class has now been updated with methods to allow for the use of tiles. Instead of calling the normal .draw() method which would just draw the entire bitmap to screen you can now use:

addTile( ident, sx, sy, width, height);

ident – a string identifier so you can reference the saved tile
sx – x location of the top left corner of the tile
sy – y location of the top left corner of the tile
width & height – Size of the tile

drawTile( ident, dx, dy, [width, height])

ident – the string identifier used in addTile method
dx – Destination x position on the canvas
dy – Destination y position on the canvas
Width & height are optional and allow you to stretch the tile on drawing for scaling operations.


Leave a Reply