com.croftsoft.apps.dodger
Class DodgerSprite
java.lang.Object
com.croftsoft.core.animation.sprite.AbstractSprite
com.croftsoft.core.animation.sprite.IconSprite
com.croftsoft.apps.dodger.DodgerSprite
- All Implemented Interfaces:
- ComponentAnimator, ComponentPainter, ComponentUpdater, Sprite, KeyListener, MouseListener, MouseMotionListener, EventListener, MouseInputListener
public class DodgerSprite
- extends IconSprite
- implements KeyListener, MouseInputListener
An IconSprite subclass representing the Dodger.
- Since:
- 2002-03-18
- 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 |
DodgerSprite
public DodgerSprite(Icon greenIcon,
Icon yellowIcon,
Icon redIcon,
Icon bangIcon,
Icon boomIcon,
AudioClip bangAudioClip,
Rectangle bounds)
getScore
public long getScore()
isShooting
public boolean isShooting()
getShootArea
public Rectangle2D getShootArea()
resetScore
public void resetScore()
setHit
public void setHit()
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
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
keyPressed
public void keyPressed(KeyEvent keyEvent)
- Specified by:
keyPressed
in interface KeyListener
keyReleased
public void keyReleased(KeyEvent keyEvent)
- Specified by:
keyReleased
in interface KeyListener
keyTyped
public void keyTyped(KeyEvent keyEvent)
- Specified by:
keyTyped
in interface KeyListener
CroftSoft Apps Javadoc (2008-09-28 21:15:07)