edu.gatech.cs2335.lemmings.engine
Class PrettySprite

java.lang.Object
  extended byedu.gatech.cs2335.lemmings.physics.PhysicsObject
      extended byedu.gatech.cs2335.lemmings.engine.PrettySprite
All Implemented Interfaces:
ICleanable
Direct Known Subclasses:
LemmingDrown, LemmingSplat, LemmingsSoul, Particle, SavedLemming

public abstract class PrettySprite
extends PhysicsObject
implements ICleanable

Class PrettySprite: This is basically an eye-candy sprite. These will be things that happen to lemmings, for instance, or maybe some other effects, like a random bird flying by.

 Revision History:
     v1.0 (Apr. 11, 2004) - Created the PrettySprite class
 

Version:
Version 1.0, Apr. 11, 2004
Author:
Vladimir Urazov

Constructor Summary
PrettySprite(java.lang.String animType)
          Creates a new PrettySprite instance.
 
Method Summary
protected abstract  boolean canKillSelf()
          Should return true when the sprite is ready to kill self.
 void cleanUp()
          Cleans up all references for the garbage collector.
 AnimatedSprite getAnimation()
          Access method for the animation property.
 Level getLevel()
          Describe getLevel method here.
 void setAnimation(java.lang.String type)
          Describe setAnimation method here.
 void setLevel(Level l)
          Describe setLevel method here.
 void updateSprite()
          Should be called at every frame to update the sprite.
 
Methods inherited from class edu.gatech.cs2335.lemmings.physics.PhysicsObject
accelerate, getGravityUpdates, getPosition, getVelocity, isFalling, setGravityUpdates, setPosition, setPosition, setVelocity, toString, updatePosition, updatePosition, updateVelocity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrettySprite

public PrettySprite(java.lang.String animType)
Creates a new PrettySprite instance.

Parameters:
animType - anime
Method Detail

getAnimation

public AnimatedSprite getAnimation()
Access method for the animation property.

Returns:
the current value of the animation property

setAnimation

public final void setAnimation(java.lang.String type)
Describe setAnimation method here.

Parameters:
type - a String value

updateSprite

public final void updateSprite()
Should be called at every frame to update the sprite.


getLevel

public final Level getLevel()
Describe getLevel method here.

Returns:
a Level value

setLevel

public final void setLevel(Level l)
Describe setLevel method here.

Parameters:
l - a Level value

cleanUp

public void cleanUp()
Cleans up all references for the garbage collector.

Specified by:
cleanUp in interface ICleanable

canKillSelf

protected abstract boolean canKillSelf()
Should return true when the sprite is ready to kill self.

Returns:
a boolean value