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
ConstructorsConstructorDescriptionEffectLayer(int duration) Create an EffectLayer for specified effect duration. -
Method Summary
Modifier and TypeMethodDescriptionvoidRender the layer.booleanCheck if the effect is old enough to have expired so that it should be removed.voidsetTileset(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:LayerRendererSet the tiles used for rendering.- Specified by:
setTilesetin classLayerRenderer- Parameters:
tileset- tile set
-
draw
Description copied from class:LayerRendererRender the layer.- Specified by:
drawin 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:
trueif the effect has expired, otherwisefalse
-