org.deken.game.sprites
Class Decor

java.lang.Object
  extended by org.deken.game.sprites.Sprite
      extended by org.deken.game.sprites.Decor
All Implemented Interfaces:
Updateable
Direct Known Subclasses:
DecorTriggerListener, MirrorTile, NullDecor

public class Decor
extends Sprite

Title: Decor

Description: An unmoving Sprite

Copyright: Copyright (c) 2002

Version:
1.0
Author:
Gary Deken

Field Summary
protected  Animation animation
           
 
Fields inherited from class org.deken.game.sprites.Sprite
boundingBox, collisionMap, location, size
 
Constructor Summary
Decor(Animation animation, SpriteSize size)
          Decor
Decor(SpriteSize size)
          Decor This constructor is used by the DocumentManager.
 
Method Summary
 Decor copy()
           
protected  Decor copyBase(Decor newDecor)
           
 void draw(java.awt.Graphics2D graphics, int xOffset, int yOffset)
          Draw
 Animation getAnimation()
          getAnimation
 void setAnimation(Animation animation)
          setAnimation
 void spriteCollison(Sprite collideSprite)
          Handle the collision with another sprite.
 void update(long elapseTime)
          update
 
Methods inherited from class org.deken.game.sprites.Sprite
getBounds, getDepth, getHeight, getLocation, getName, getSize, getWidth, getXLocation, getYLocation, removeFromMap, setBoundingBox, setBoundingBox, setCollisionMap, setLocation, setName, setSize, toString, updateLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

animation

protected Animation animation
Constructor Detail

Decor

public Decor(SpriteSize size)
Decor This constructor is used by the DocumentManager. It is not recommended to use this outside of that class.

Parameters:
size - SpriteSize

Decor

public Decor(Animation animation,
             SpriteSize size)
Decor

Parameters:
animation - Animation
size - SpriteSize
Method Detail

copy

public Decor copy()
Specified by:
copy in class Sprite
Returns:
Decor

draw

public void draw(java.awt.Graphics2D graphics,
                 int xOffset,
                 int yOffset)
Draw

Specified by:
draw in class Sprite
Parameters:
graphics -
xOffset -
yOffset -

update

public void update(long elapseTime)
update

Specified by:
update in interface Updateable
Specified by:
update in class Sprite
Parameters:
elapseTime - long

spriteCollison

public void spriteCollison(Sprite collideSprite)
Description copied from class: Sprite
Handle the collision with another sprite.

Specified by:
spriteCollison in class Sprite

getAnimation

public Animation getAnimation()
getAnimation

Retrieve the animation strip for this sprite.

Returns:
Animation

setAnimation

public void setAnimation(Animation animation)
setAnimation

This sets the animation strip for the this sprite.

Parameters:
animation - Animation

copyBase

protected Decor copyBase(Decor newDecor)
Parameters:
newDecor -
Returns:
Decor