Drawing tiles
is a simple container to draw one Tile
. It’s the most basic type, but should be used with caution, as each Bitmap
causes a draw call.
With @:privateAccess tileGroup.content
it’s possible to access underlying instance and do more fine-tuned geometry operations other than simple rectangles.
BasicElement and updates
h2d.SpriteBatch.BasicElement
is a good example of how update
method can be utilized. This class provides simple simulation of gravity, friction and velocity.
The example uses a backdrop.png, bunnies.png, tiles.json and tiles.png files, that should be put in the resources (/res
) folder. Those files are not included in samples directory.