public class Collision extends Object implements Nameable
CollisionConfig.getCollision(String)
and
Collidable.addCollision(Collision)
.Configurer
,
ComponentCollision
Constructor and Description |
---|
Collision(String name,
int offsetX,
int offsetY,
int width,
int height,
boolean mirror)
Create a collision.
|
Modifier and Type | Method and Description |
---|---|
int |
getHeight()
Get the collision height.
|
String |
getName() |
int |
getOffsetX()
Get the horizontal collision offset.
|
int |
getOffsetY()
Get the vertical collision offset.
|
int |
getWidth()
Get the collision width.
|
boolean |
hasMirror()
Get the mirror flag.
|
public Collision(String name, int offsetX, int offsetY, int width, int height, boolean mirror)
name
- The collision name.offsetX
- The collision horizontal offset.offsetY
- The collision vertical offset.width
- The collision width.height
- The collision height.mirror
- The mirror flag.public int getOffsetX()
public int getOffsetY()
public int getWidth()
public int getHeight()
public boolean hasMirror()
true
if has mirror, false
else.Copyright © 2016 Byron 3D Games Studio. All rights reserved.