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 CollisionEntity
Field Summary
Constructor Summary
Constructors Constructor Description CollisionBox()
Instantiates a newCollisionBox
entity.CollisionBox(boolean obstructingLight)
Instantiates a newCollisionBox
entity.CollisionBox(double width, double height)
Instantiates a newCollisionBox
entity.CollisionBox(double x, double y, double width, double height)
Instantiates a newCollisionBox
entity.CollisionBox(java.awt.geom.Rectangle2D box)
Instantiates a newCollisionBox
entity.Method Summary
Modifier and Type Method Description boolean
isObstructingLight()
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, setWidth
Methods 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, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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 newCollisionBox
entity.CollisionBox
public CollisionBox(boolean obstructingLight)Instantiates a newCollisionBox
entity.- Parameters:
obstructingLight
- A flag indicating whether this instance should obstruct lights.
CollisionBox
public CollisionBox(double width, double height)Instantiates a newCollisionBox
entity.- 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 newCollisionBox
entity.- 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 newCollisionBox
entity.- Parameters:
box
- The rectangle defining the location and dimension of this instnace.
Method Details
isObstructingLight
public boolean isObstructingLight()