com.croftsoft.core.animation.sprite
Class AbstractSprite
java.lang.Object
com.croftsoft.core.animation.sprite.AbstractSprite
- All Implemented Interfaces:
- ComponentAnimator, ComponentPainter, ComponentUpdater, Sprite
- Direct Known Subclasses:
- IconSprite, TextSprite
public abstract class AbstractSprite
- extends Object
- implements Sprite
An abstract Sprite implementation.
- Since:
- 2002-03-07
- Version:
- 2003-07-12
- Author:
- David Wallace Croft
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
x
protected double x
y
protected double y
z
protected double z
heading
protected double heading
velocity
protected double velocity
componentUpdater
protected ComponentUpdater componentUpdater
componentPainter
protected ComponentPainter componentPainter
AbstractSprite
public AbstractSprite(double x,
double y,
double z,
double heading,
double velocity,
ComponentUpdater componentUpdater,
ComponentPainter componentPainter)
AbstractSprite
public AbstractSprite()
getX
public double getX()
- Specified by:
getX in interface Sprite
getY
public double getY()
- Specified by:
getY in interface Sprite
getZ
public double getZ()
- Specified by:
getZ in interface Sprite
getHeading
public double getHeading()
- Specified by:
getHeading in interface Sprite
getVelocity
public double getVelocity()
- Specified by:
getVelocity in interface Sprite
getCollisionBounds
public void getCollisionBounds(Rectangle collisionBounds)
- Specified by:
getCollisionBounds in interface Sprite
setX
public void setX(double x)
- Specified by:
setX in interface Sprite
setY
public void setY(double y)
- Specified by:
setY in interface Sprite
setZ
public void setZ(double z)
- Specified by:
setZ in interface Sprite
setHeading
public void setHeading(double heading)
- Specified by:
setHeading in interface Sprite
setVelocity
public void setVelocity(double velocity)
- Specified by:
setVelocity in interface Sprite
setComponentUpdater
public void setComponentUpdater(ComponentUpdater componentUpdater)
setComponentPainter
public void setComponentPainter(ComponentPainter componentPainter)
update
public void update(JComponent component)
- Description copied from interface:
ComponentUpdater
- Updates the state of a JComponent and calls repaint() as required.
- Specified by:
update in interface ComponentUpdater
paint
public void paint(JComponent component,
Graphics2D graphics)
- Specified by:
paint in interface ComponentPainter
CroftSoft Core Javadoc (2008-09-28 20:58:02)