public class TiledCollisionPointFactory extends java.lang.Object implements TiledCollisionFactory<CollisionPoint>
TiledCollisionFactory
that creates
CollisionPoint
instancesConstructor and Description |
---|
TiledCollisionPointFactory() |
Modifier and Type | Method and Description |
---|---|
CollisionPoint |
createCollision(TiledMap map,
TiledObject tiledObject)
Create a new collision from a
TiledObject |
CollisionPoint |
createCollision(TiledMap map,
Tile tile,
float x,
float y,
float width,
float height)
Create a new collision from a
Tile |
public CollisionPoint createCollision(TiledMap map, Tile tile, float x, float y, float width, float height)
TiledCollisionFactory
Tile
createCollision
in interface TiledCollisionFactory<CollisionPoint>
map
- The source TiledMap
tile
- The source Tile
x
- The x coordinate of the Tile
y
- The y coordinate of the Tile
width
- 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 CollisionPoint createCollision(TiledMap map, TiledObject tiledObject)
TiledCollisionFactory
TiledObject
createCollision
in interface TiledCollisionFactory<CollisionPoint>
map
- The source TiledMap
tiledObject
- The TiledObject