game.graphics.sprite
Class CStaticSprite

java.lang.Object
  extended by game.physics.CStaticShape
      extended by game.graphics.sprite.CStaticSprite
All Implemented Interfaces:
IGraphicObject

public class CStaticSprite
extends CStaticShape
implements IGraphicObject

A simple non-moving, unanimated sprite. Usefull for screen deco / HUD.

Author:
seb

Field Summary
private  java.awt.Image m_sprite
           
 
Fields inherited from class game.physics.CStaticShape
m_box, m_gameDisplay, m_isHidden
 
Constructor Summary
CStaticSprite(IGameDisplay gameRect, CBoundingBox box, java.awt.Image sprite)
           
 
Method Summary
 void draw(java.awt.Graphics g)
          Simply draws the sprite image.
 
Methods inherited from class game.physics.CStaticShape
animate, cycle, drawBox, getCenter, getVelocity, hide, intersect, isHidden, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface game.graphics.IGraphicObject
animate, cycle, getCenter, getVelocity, intersect
 

Field Detail

m_sprite

private java.awt.Image m_sprite
Constructor Detail

CStaticSprite

public CStaticSprite(IGameDisplay gameRect,
                     CBoundingBox box,
                     java.awt.Image sprite)
Parameters:
gameRect - : the rectangle the sprite will evolve in
box - : the sprite's bounding box (can be different than image size)
sprite - : the sprite's image
Method Detail

draw

public void draw(java.awt.Graphics g)
Simply draws the sprite image.

Specified by:
draw in interface IGraphicObject