com.croftsoft.apps.shooter
Class ShooterSprite
java.lang.Object
com.croftsoft.core.animation.sprite.AbstractSprite
com.croftsoft.apps.shooter.ShooterSprite
- All Implemented Interfaces:
- ComponentAnimator, ComponentPainter, ComponentUpdater, Sprite, MouseListener, MouseMotionListener, EventListener, MouseInputListener
public class ShooterSprite
- extends AbstractSprite
- implements MouseInputListener
An IconSprite subclass representing the Attacker.
- Since:
- 2002-03-23
- Version:
- 2003-07-11
- Author:
- David Wallace Croft
Methods inherited from class com.croftsoft.core.animation.sprite.AbstractSprite |
getCollisionBounds, getHeading, getVelocity, getX, getY, getZ, setComponentPainter, setComponentUpdater, setHeading, setVelocity, setX, setY, setZ |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShooterSprite
public ShooterSprite(Image restImage,
Image bangImage,
Image boomImage,
AudioClip bangAudioClip,
Shooter shooter)
getScore
public long getScore()
getCollisionShape
public Shape getCollisionShape()
- Specified by:
getCollisionShape
in interface Sprite
getPaintBounds
public void getPaintBounds(Rectangle paintBounds)
- Specified by:
getPaintBounds
in interface Sprite
setHit
public void setHit()
resetScore
public void resetScore()
update
public void update(JComponent component)
- Description copied from interface:
com.croftsoft.core.animation.ComponentUpdater
- Updates the state of a JComponent and calls repaint() as required.
- Specified by:
update
in interface ComponentUpdater
- Overrides:
update
in class AbstractSprite
paint
public void paint(JComponent component,
Graphics2D graphics)
- Specified by:
paint
in interface ComponentPainter
- Overrides:
paint
in class AbstractSprite
mouseClicked
public void mouseClicked(MouseEvent mouseEvent)
- Specified by:
mouseClicked
in interface MouseListener
mouseDragged
public void mouseDragged(MouseEvent mouseEvent)
- Specified by:
mouseDragged
in interface MouseMotionListener
mouseEntered
public void mouseEntered(MouseEvent mouseEvent)
- Specified by:
mouseEntered
in interface MouseListener
mouseExited
public void mouseExited(MouseEvent mouseEvent)
- Specified by:
mouseExited
in interface MouseListener
mouseMoved
public void mouseMoved(MouseEvent mouseEvent)
- Specified by:
mouseMoved
in interface MouseMotionListener
mousePressed
public void mousePressed(MouseEvent mouseEvent)
- Specified by:
mousePressed
in interface MouseListener
mouseReleased
public void mouseReleased(MouseEvent mouseEvent)
- Specified by:
mouseReleased
in interface MouseListener
CroftSoft Apps Javadoc (2008-09-28 21:15:07)