org.haphazard.gui.engine
Class GlobalEffects

java.lang.Object
  extended byorg.haphazard.gui.engine.GlobalEffects

public class GlobalEffects
extends java.lang.Object

GlobalEffects is a singleton to be used for effects as snow, rain and attacks


Method Summary
 void displayEffect(java.awt.Graphics2D g, java.lang.String effectKey, int windowWidth, int windowHeight)
           
 void displayEffectOnTile(java.lang.String effect, Point3D tileCoordinate, Map map)
          This display one effect on a tile on a map.
static GlobalEffects getInstance()
          Returns the statical instance of this object
 void loadGraphicalObject(java.io.InputStream stream)
          The GlobalEffects contains a GraphicalObject that has several sprites.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static GlobalEffects getInstance()
Returns the statical instance of this object

Returns:
the instance of the GlobalEffects-object

loadGraphicalObject

public void loadGraphicalObject(java.io.InputStream stream)
The GlobalEffects contains a GraphicalObject that has several sprites. This function loads that GraphicalObject from the file.

Parameters:
stream - The stream to be loaded

displayEffectOnTile

public void displayEffectOnTile(java.lang.String effect,
                                Point3D tileCoordinate,
                                Map map)
This display one effect on a tile on a map.

Parameters:
effect - the name of the effect. This must be spriteKey in the GraphicalObject.
tileCoordinate - the coordinate of this effect
map - on what map the effect should be on

displayEffect

public void displayEffect(java.awt.Graphics2D g,
                          java.lang.String effectKey,
                          int windowWidth,
                          int windowHeight)