testing.gameEngine.WormsDemo.items
Class Worm
java.lang.Object
vooga.gameEngine.game.GameRelatedObject
vooga.gameEngine.item.GameItem
testing.gameEngine.WormsDemo.items.Worm
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Renderable>, java.util.EventListener, WormMoveListener, Collidable<Renderable>, Renderable, Tangible, TimeListener
public class Worm
- extends GameItem
- implements WormMoveListener, TimeListener, Collidable<Renderable>
main class for the worm
- Author:
- Jacob Harer
- See Also:
- Serialized Form
Field Summary |
static java.util.ResourceBundle |
RESOURCES
|
Methods inherited from class vooga.gameEngine.item.GameItem |
compareTo, getPosition, getRotation, getShape, getSize, getTexture, isVisible, move, resize, rotate, setPosition, setRotation, setSize, setVisibility |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
compareTo |
RESOURCES
public static final java.util.ResourceBundle RESOURCES
Worm
public Worm(Position p,
Dimension d)
moveDown
public void moveDown(DownInputEvent e)
- Specified by:
moveDown
in interface WormMoveListener
moveLeft
public void moveLeft(LeftInputEvent e)
- Specified by:
moveLeft
in interface WormMoveListener
moveRight
public void moveRight(RightInputEvent e)
- Specified by:
moveRight
in interface WormMoveListener
moveUp
public void moveUp(UpInputEvent e)
- Specified by:
moveUp
in interface WormMoveListener
timeUpdated
public void timeUpdated(TimeUpdateEvent t)
- Description copied from interface:
TimeListener
- Receives an
TimeUpdateEvent
for the implementing class to
process.
- Specified by:
timeUpdated
in interface TimeListener
- Parameters:
t
- is the TimeUpdateEvent
collide
public void collide(TerrainPiece otherObject)
collide
public void collide(Renderable otherObject)
- Description copied from interface:
Collidable
- This method is called whenever an object of the specified type has
collided with this object.
- Specified by:
collide
in interface Collidable<Renderable>
- Parameters:
otherObject
- that has collided with this object