public class Collision extends Object implements Nameable
CollisionConfig.getCollision(String)
and Collidable.addCollision(Collision)
.ComponentCollision
Modifier and Type | Field and Description |
---|---|
static Collision |
AUTOMATIC
Compute automatically collision by using the owner size.
|
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 |
---|---|
boolean |
equals(Object object) |
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.
|
int |
hashCode() |
boolean |
hasMirror()
Get the mirror flag.
|
public static final Collision AUTOMATIC
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.LionEngineException
- If null
name.public int getOffsetX()
public int getOffsetY()
public int getWidth()
public int getHeight()
public boolean hasMirror()
true
if has mirror, false
else.Copyright © 2017 Byron 3D Games Studio. All rights reserved.