public abstract class CollisionEntity extends Entity implements ICollisionEntity
ANY_MESSAGE| Modifier | Constructor and Description |
|---|---|
protected |
CollisionEntity() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCollideWith(ICollisionEntity otherEntity) |
java.awt.geom.Rectangle2D |
getCollisionBox()
Gets the collision box.
|
java.awt.geom.Rectangle2D |
getCollisionBox(java.awt.geom.Point2D location)
Gets the collision box.
|
static java.awt.geom.Rectangle2D |
getCollisionBox(java.awt.geom.Point2D location,
double entityWidth,
double entityHeight,
double collisionBoxWidth,
double collisionBoxHeight,
Align align,
Valign valign) |
Align |
getCollisionBoxAlign() |
java.awt.geom.Point2D |
getCollisionBoxCenter()
Gets the center
Point2D of the entities collision box. |
float |
getCollisionBoxHeight() |
Valign |
getCollisionBoxValign() |
float |
getCollisionBoxWidth() |
boolean |
hasCollision()
Checks for collision.
|
void |
setCollision(boolean collision)
Sets the collision.
|
void |
setCollisionBoxAlign(Align align) |
void |
setCollisionBoxHeight(float collisionBoxHeight) |
void |
setCollisionBoxValign(Valign valign) |
void |
setCollisionBoxWidth(float collisionBoxWidth) |
void |
setHeight(float height) |
void |
setLocation(java.awt.geom.Point2D location)
Sets the map location.
|
void |
setSize(float width,
float height) |
void |
setWidth(float width) |
addController, addListener, addMessageListener, addMessageListener, addTag, addTransformListener, attachControllers, detachControllers, getAngle, getAnimationController, getBehaviorController, getBoundingBox, getCenter, getController, getControllers, getHeight, getLocation, getMapId, getName, getProperties, getRenderType, getTags, getWidth, getX, getY, hasTag, loaded, removed, removeListener, removeMessageListener, removeTag, removeTransformListener, sendMessage, setAngle, setController, setLocation, setMapId, setName, setProperties, setRenderType, setX, setY, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddController, addListener, addMessageListener, addMessageListener, addTag, addTransformListener, attachControllers, detachControllers, getAngle, getAnimationController, getBehaviorController, getBoundingBox, getCenter, getController, getHeight, getLocation, getMapId, getName, getProperties, getRenderType, getTags, getWidth, getX, getY, hasTag, loaded, removed, removeListener, removeMessageListener, removeTag, removeTransformListener, sendMessage, setController, setLocation, setMapId, setName, setRenderType, setX, setYpublic static java.awt.geom.Rectangle2D getCollisionBox(java.awt.geom.Point2D location,
double entityWidth,
double entityHeight,
double collisionBoxWidth,
double collisionBoxHeight,
Align align,
Valign valign)
public boolean canCollideWith(ICollisionEntity otherEntity)
canCollideWith in interface ICollisionEntitypublic Align getCollisionBoxAlign()
getCollisionBoxAlign in interface ICollisionEntitypublic java.awt.geom.Rectangle2D getCollisionBox()
getCollisionBox in interface ICollisionEntitypublic java.awt.geom.Rectangle2D getCollisionBox(java.awt.geom.Point2D location)
getCollisionBox in interface ICollisionEntitylocation - the locationpublic float getCollisionBoxHeight()
getCollisionBoxHeight in interface ICollisionEntitypublic float getCollisionBoxWidth()
getCollisionBoxWidth in interface ICollisionEntitypublic java.awt.geom.Point2D getCollisionBoxCenter()
ICollisionEntityPoint2D of the entities collision box.getCollisionBoxCenter in interface ICollisionEntityPoint2D of the entities collision boxpublic Valign getCollisionBoxValign()
getCollisionBoxValign in interface ICollisionEntitypublic boolean hasCollision()
hasCollision in interface ICollisionEntitypublic void setCollision(boolean collision)
setCollision in interface ICollisionEntitycollision - the new collisionpublic void setCollisionBoxAlign(Align align)
setCollisionBoxAlign in interface ICollisionEntitypublic void setCollisionBoxHeight(float collisionBoxHeight)
setCollisionBoxHeight in interface ICollisionEntitypublic void setCollisionBoxValign(Valign valign)
setCollisionBoxValign in interface ICollisionEntitypublic void setCollisionBoxWidth(float collisionBoxWidth)
setCollisionBoxWidth in interface ICollisionEntitypublic void setLocation(java.awt.geom.Point2D location)
EntitysetLocation in interface IEntitysetLocation in class Entitylocation - the new map locationpublic void setSize(float width,
float height)
public void setHeight(float height)