public class TiledCollisionBoxFactory extends java.lang.Object implements TiledCollisionFactory<CollisionBox>
TiledCollisionFactory that creates
CollisionBox instances| Constructor and Description |
|---|
TiledCollisionBoxFactory() |
| Modifier and Type | Method and Description |
|---|---|
CollisionBox |
createCollision(TiledMap map,
TiledObject tiledObject)
Create a new collision from a
TiledObject |
CollisionBox |
createCollision(TiledMap map,
Tile tile,
float x,
float y,
float width,
float height)
Create a new collision from a
Tile |
public CollisionBox createCollision(TiledMap map, Tile tile, float x, float y, float width, float height)
TiledCollisionFactoryTilecreateCollision in interface TiledCollisionFactory<CollisionBox>map - The source TiledMaptile - The source Tilex - The x coordinate of the Tiley - The y coordinate of the Tilewidth - The width of the Tile (Note: if wider than
Tile this means there are multiple of the same
Tile - this will only happen when using TiledCollisionMerger)height - The height of the Tile (Note: if higher than
Tile this means there are multiple of the same
Tile - this will only happen when using TiledCollisionMerger)public CollisionBox createCollision(TiledMap map, TiledObject tiledObject)
TiledCollisionFactoryTiledObjectcreateCollision in interface TiledCollisionFactory<CollisionBox>map - The source TiledMaptiledObject - The TiledObject