public class LightSource extends Entity implements IRenderable
Modifier and Type | Class and Description |
---|---|
static class |
LightSource.Type |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_INTENSITY |
static java.lang.String |
TOGGLE_MESSAGE |
ANY_MESSAGE
Constructor and Description |
---|
LightSource(int intensity,
java.awt.Color lightColor,
LightSource.Type shapeType,
boolean activated) |
Modifier and Type | Method and Description |
---|---|
void |
activate() |
void |
deactivate() |
java.awt.Color |
getColor() |
double |
getFocusOffsetX() |
double |
getFocusOffsetY() |
int |
getIntensity() |
java.awt.Shape |
getLightShape() |
LightSource.Type |
getLightShapeType() |
int |
getRadius() |
boolean |
isActive() |
void |
render(java.awt.Graphics2D g) |
java.lang.String |
sendMessage(java.lang.Object sender,
java.lang.String message) |
void |
setColor(java.awt.Color result) |
void |
setFocusOffsetX(double focusOffsetX) |
void |
setFocusOffsetY(double focusOffsetY) |
void |
setHeight(double height) |
void |
setIntensity(int intensity) |
void |
setLightShapeType(LightSource.Type shapeType) |
void |
setLocation(java.awt.geom.Point2D location)
Sets the map location.
|
void |
setSize(double width,
double height) |
void |
setWidth(double width) |
void |
setX(double x) |
void |
setY(double y) |
void |
toggle() |
actions, addController, addListener, addMessageListener, addMessageListener, addTag, addTransformListener, attachControllers, detachControllers, getAngle, getAnimationController, getBehaviorController, getBoundingBox, getCenter, getController, getControllers, getEnvironment, getHeight, getLocation, getMapId, getName, getProperties, getRenderType, getTags, getWidth, getX, getY, hasTag, isLoaded, loaded, perform, register, removed, removeListener, removeMessageListener, removeTag, removeTransformListener, renderWithLayer, setAngle, setController, setLocation, setMapId, setName, setRenderType, setRenderWithLayer, toString
public static final java.lang.String TOGGLE_MESSAGE
public static final int DEFAULT_INTENSITY
public LightSource(int intensity, java.awt.Color lightColor, LightSource.Type shapeType, boolean activated)
public void activate()
public void deactivate()
public java.awt.Color getColor()
public double getFocusOffsetX()
public double getFocusOffsetY()
public int getIntensity()
public java.awt.Shape getLightShape()
public LightSource.Type getLightShapeType()
public int getRadius()
public boolean isActive()
public void render(java.awt.Graphics2D g)
render
in interface IRenderable
public void setFocusOffsetX(double focusOffsetX)
public void setFocusOffsetY(double focusOffsetY)
public void setColor(java.awt.Color result)
public void setIntensity(int intensity)
public void setLightShapeType(LightSource.Type shapeType)
public void setX(double x)
public void setY(double y)
public void setWidth(double width)
public void setHeight(double height)
public void setLocation(java.awt.geom.Point2D location)
Entity
setLocation
in interface IEntity
setLocation
in class Entity
location
- the new map locationpublic void setSize(double width, double height)
public void toggle()
public java.lang.String sendMessage(java.lang.Object sender, java.lang.String message)
sendMessage
in interface IEntity
sendMessage
in class Entity