Class StaticShadow
java.lang.Object
de.gurkenlabs.litiengine.entities.Entity
de.gurkenlabs.litiengine.entities.MapArea
de.gurkenlabs.litiengine.entities.StaticShadow
- All Implemented Interfaces:
EntityRenderedListener,EntityRenderListener,IEntity,Tweenable,java.util.EventListener
public class StaticShadow
extends MapAreaField Summary
Fields Modifier and Type Field Description static java.awt.ColorDEFAULT_COLORstatic intDEFAULT_OFFSETConstructor Summary
Constructors Constructor Description StaticShadow(double x, double y, float width, float height, StaticShadowType shadowType)Instantiates a newStaticShadowentity.StaticShadow(int id, double x, double y, float width, float height, StaticShadowType shadowType)Instantiates a newStaticShadowentity.StaticShadow(int id, java.lang.String name, double x, double y, float width, float height, StaticShadowType shadowType)Instantiates a newStaticShadowentity.StaticShadow(CollisionBox collisionBox)Instantiates a newStaticShadowentity.StaticShadow(StaticShadowType shadowType)Instantiates a newStaticShadowentity.StaticShadow(StaticShadowType shadowType, int offset)Instantiates a newStaticShadowentity.Method Summary
Modifier and Type Method Description java.awt.geom.AreagetArea()java.awt.geom.Rectangle2DgetBoundingBox()intgetOffset()CollisionBoxgetOrigin()StaticShadowTypegetShadowType()voidsetHeight(double height)voidsetLocation(java.awt.geom.Point2D location)Sets the map location.voidsetOffset(int shadowOffset)voidsetShadowType(StaticShadowType shadowType)voidsetWidth(double width)voidsetX(double x)voidsetY(double y)java.lang.StringtoString()Methods inherited from class de.gurkenlabs.litiengine.entities.Entity
actions, addController, addEntityRenderListener, addListener, addTag, addTransformListener, animations, attachControllers, behavior, canRender, detachControllers, getAngle, getCenter, getController, getControllers, getEnvironment, getHeight, getLocation, getMapId, getName, getProperties, getRenderType, getTags, getTweenValues, 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, setSize, setTweenValues, setVisible
Field Details
DEFAULT_COLOR
public static final java.awt.Color DEFAULT_COLORDEFAULT_OFFSET
public static final int DEFAULT_OFFSET- See Also:
- Constant Field Values
Constructor Details
StaticShadow
Instantiates a newStaticShadowentity.- Parameters:
shadowType- The type of the static shadow.offset- The offset for the shadow.
StaticShadow
Instantiates a newStaticShadowentity.- Parameters:
shadowType- The type of the static shadow.
StaticShadow
Instantiates a newStaticShadowentity.- 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.shadowType- The type of the static shadow.
StaticShadow
public StaticShadow(int id, double x, double y, float width, float height, StaticShadowType shadowType)Instantiates a newStaticShadowentity.- Parameters:
id- The id of this entity.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.shadowType- The type of the static shadow.
StaticShadow
public StaticShadow(int id, java.lang.String name, double x, double y, float width, float height, StaticShadowType shadowType)Instantiates a newStaticShadowentity.- Parameters:
id- The id of this entity.name- The name of this entity.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.shadowType- The type of the static shadow.
StaticShadow
Instantiates a newStaticShadowentity.- Parameters:
collisionBox- The collision box from which this shadow instance originates from.
Method Details
getShadowType
setShadowType
setX
public void setX(double x)setY
public void setY(double y)setWidth
public void setWidth(double width)setHeight
public void setHeight(double height)setLocation
public void setLocation(java.awt.geom.Point2D location)Description copied from class:EntitySets the map location.- Specified by:
setLocationin interfaceIEntity- Overrides:
setLocationin classEntity- Parameters:
location- the new map location
getOrigin
toString
public java.lang.String toString()getBoundingBox
public java.awt.geom.Rectangle2D getBoundingBox()- Specified by:
getBoundingBoxin interfaceIEntity- Overrides:
getBoundingBoxin classEntity
getArea
public java.awt.geom.Area getArea()getOffset
public int getOffset()setOffset
public void setOffset(int shadowOffset)
