Package games.stendhal.client.gui
Class EffectLayer
java.lang.Object
games.stendhal.client.LayerRenderer
games.stendhal.client.gui.EffectLayer
- Direct Known Subclasses:
BlackenScreenEffect
,LightningEffect
A renderer for map wide effects. These effects are normally temporary and
they are automatically removed as soon as
isExpired()
returns
true
.-
Field Summary
Fields inherited from class games.stendhal.client.LayerRenderer
height, width
-
Constructor Summary
ConstructorDescriptionEffectLayer(int duration)
Create an EffectLayer for specified effect duration. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Render the layer.boolean
Check if the effect is old enough to have expired so that it should be removed.void
setTileset(Tileset tileset)
Set the tiles used for rendering.Methods inherited from class games.stendhal.client.LayerRenderer
getHeight, getWidth
-
Constructor Details
-
EffectLayer
public EffectLayer(int duration)Create an EffectLayer for specified effect duration.- Parameters:
duration
- effect duration in milliseconds
-
-
Method Details
-
setTileset
Description copied from class:LayerRenderer
Set the tiles used for rendering.- Specified by:
setTileset
in classLayerRenderer
- Parameters:
tileset
- tile set
-
draw
Description copied from class:LayerRenderer
Render the layer.- Specified by:
draw
in classLayerRenderer
- Parameters:
g
- The graphics to draw tox
- starting x coordinate in world unitsy
- starting y coordinate in world unitsw
- width in world unitsh
- height in world units
-
isExpired
public boolean isExpired()Check if the effect is old enough to have expired so that it should be removed.- Returns:
true
if the effect has expired, otherwisefalse
-