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 MapArea
Field Summary
Fields Modifier and Type Field Description static java.awt.Color
DEFAULT_COLOR
static int
DEFAULT_OFFSET
Constructor Summary
Constructors Constructor Description StaticShadow(double x, double y, float width, float height, StaticShadowType shadowType)
Instantiates a newStaticShadow
entity.StaticShadow(int id, double x, double y, float width, float height, StaticShadowType shadowType)
Instantiates a newStaticShadow
entity.StaticShadow(int id, java.lang.String name, double x, double y, float width, float height, StaticShadowType shadowType)
Instantiates a newStaticShadow
entity.StaticShadow(CollisionBox collisionBox)
Instantiates a newStaticShadow
entity.StaticShadow(StaticShadowType shadowType)
Instantiates a newStaticShadow
entity.StaticShadow(StaticShadowType shadowType, int offset)
Instantiates a newStaticShadow
entity.Method Summary
Modifier and Type Method Description java.awt.geom.Area
getArea()
java.awt.geom.Rectangle2D
getBoundingBox()
int
getOffset()
CollisionBox
getOrigin()
StaticShadowType
getShadowType()
void
setHeight(double height)
void
setLocation(java.awt.geom.Point2D location)
Sets the map location.void
setOffset(int shadowOffset)
void
setShadowType(StaticShadowType shadowType)
void
setWidth(double width)
void
setX(double x)
void
setY(double y)
java.lang.String
toString()
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 newStaticShadow
entity.- Parameters:
shadowType
- The type of the static shadow.offset
- The offset for the shadow.
StaticShadow
Instantiates a newStaticShadow
entity.- Parameters:
shadowType
- The type of the static shadow.
StaticShadow
Instantiates a newStaticShadow
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.shadowType
- The type of the static shadow.
StaticShadow
public StaticShadow(int id, double x, double y, float width, float height, StaticShadowType shadowType)Instantiates a newStaticShadow
entity.- 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 newStaticShadow
entity.- 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 newStaticShadow
entity.- 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:Entity
Sets the map location.- Specified by:
setLocation
in interfaceIEntity
- Overrides:
setLocation
in classEntity
- Parameters:
location
- the new map location
getOrigin
toString
public java.lang.String toString()getBoundingBox
public java.awt.geom.Rectangle2D getBoundingBox()- Specified by:
getBoundingBox
in interfaceIEntity
- Overrides:
getBoundingBox
in classEntity
getArea
public java.awt.geom.Area getArea()getOffset
public int getOffset()setOffset
public void setOffset(int shadowOffset)