Class CollisionBox
java.lang.Object
de.gurkenlabs.litiengine.entities.Entity
de.gurkenlabs.litiengine.entities.CollisionEntity
de.gurkenlabs.litiengine.entities.CollisionBox
- All Implemented Interfaces:
EntityRenderedListener,EntityRenderListener,ICollisionEntity,IEntity,Tweenable,java.util.EventListener
public class CollisionBox
extends CollisionEntityField Summary
Constructor Summary
Constructors Constructor Description CollisionBox()Instantiates a newCollisionBoxentity.CollisionBox(boolean obstructingLight)Instantiates a newCollisionBoxentity.CollisionBox(double width, double height)Instantiates a newCollisionBoxentity.CollisionBox(double x, double y, double width, double height)Instantiates a newCollisionBoxentity.CollisionBox(java.awt.geom.Rectangle2D box)Instantiates a newCollisionBoxentity.Method Summary
Modifier and Type Method Description booleanisObstructingLight()Methods inherited from class de.gurkenlabs.litiengine.entities.CollisionEntity
canCollideWith, fireCollisionEvent, getCollisionBox, getCollisionBox, getCollisionBox, getCollisionBoxAlign, getCollisionBoxCenter, getCollisionBoxHeight, getCollisionBoxValign, getCollisionBoxWidth, getCollisionType, getTweenValues, hasCollision, onCollision, refreshCollisionBox, removeCollisionListener, setCollision, setCollisionBoxAlign, setCollisionBoxHeight, setCollisionBoxValign, setCollisionBoxWidth, setCollisionType, setHeight, setLocation, setSize, setTweenValues, setWidthMethods inherited from class de.gurkenlabs.litiengine.entities.Entity
actions, addController, addEntityRenderListener, addListener, addTag, addTransformListener, animations, attachControllers, behavior, canRender, detachControllers, getAngle, getBoundingBox, getCenter, getController, getControllers, getEnvironment, getHeight, getLocation, getMapId, getName, getProperties, getRenderType, getTags, getWidth, getX, getY, hasTag, isLoaded, isVisible, loaded, onMessage, onMessage, onRendered, perform, register, removed, removeListener, removeListener, removeListener, removeListener, removeListener, removeTag, rendered, rendering, renderWithLayer, sendMessage, setAngle, setController, setLocation, setMapId, setName, setRenderType, setRenderWithLayer, setVisible, setX, setY, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.gurkenlabs.litiengine.entities.IEntity
actions, addController, addEntityRenderListener, addListener, addTag, addTransformListener, animations, attachControllers, behavior, detachControllers, getAngle, getBoundingBox, getCenter, getController, getEnvironment, getHeight, getLocation, getMapId, getName, getProperties, getRenderType, getTags, getWidth, getX, getY, hasTag, isLoaded, isVisible, loaded, onMessage, onMessage, onRendered, perform, register, removed, removeListener, removeListener, removeListener, removeListener, removeListener, removeTag, renderWithLayer, sendMessage, setAngle, setController, setLocation, setMapId, setName, setRenderType, setRenderWithLayer, setVisible, setX, setY
Constructor Details
CollisionBox
public CollisionBox()Instantiates a newCollisionBoxentity.CollisionBox
public CollisionBox(boolean obstructingLight)Instantiates a newCollisionBoxentity.- Parameters:
obstructingLight- A flag indicating whether this instance should obstruct lights.
CollisionBox
public CollisionBox(double width, double height)Instantiates a newCollisionBoxentity.- Parameters:
width- The width of this instance.height- The height of this instance.
CollisionBox
public CollisionBox(double x, double y, double width, double height)Instantiates a newCollisionBoxentity.- Parameters:
x- The x-coordinate of this instance.y- The y-coordinate of this instance.width- The width of this instance.height- The height of this instance.
CollisionBox
public CollisionBox(java.awt.geom.Rectangle2D box)Instantiates a newCollisionBoxentity.- Parameters:
box- The rectangle defining the location and dimension of this instnace.
Method Details
isObstructingLight
public boolean isObstructingLight()
