Currently users set what tile in a texture by passing in a size and tileIndex to the drawing functions.
This is not ideal because all tiles must be on a grid, and really there should be a texture tile class that handles this. This allows better organization for more complex games so the tile information can be setup in a more central location or created dynamically.
The plan is to create called a new class TileTexture, that holds the uv and size of a tile. The constructor will take a size and tile index so by default it is easy to retrofit with the current system. There will also be functions to set exact pixels for the tile, to support cases where the art is not on a grid. There will also be a function to offset the tile on a grid for animation systems.
Currently users set what tile in a texture by passing in a size and tileIndex to the drawing functions.
This is not ideal because all tiles must be on a grid, and really there should be a texture tile class that handles this. This allows better organization for more complex games so the tile information can be setup in a more central location or created dynamically.
The plan is to create called a new class TileTexture, that holds the uv and size of a tile. The constructor will take a size and tile index so by default it is easy to retrofit with the current system. There will also be functions to set exact pixels for the tile, to support cases where the art is not on a grid. There will also be a function to offset the tile on a grid for animation systems.