games.pinball
Class PaddleRight
java.lang.Object
vooga.gameEngine.game.GameRelatedObject
vooga.gameEngine.item.GameItem
vooga.physicsEngine.PhysicalItem
games.pinball.PaddleRight
- All Implemented Interfaces:
- MoveListener, java.io.Serializable, java.lang.Comparable<Renderable>, java.util.EventListener, Collidable<PhysicalItem>, Renderable, Tangible, TimeListener
public class PaddleRight
- extends PhysicalItem
- implements MoveListener, Collidable<PhysicalItem>, TimeListener
Constructs the left paddle.
- Author:
- Sami Boghos
- See Also:
- Serialized Form
Constructor Summary |
PaddleRight(double width,
double height)
Create a new Paddle as a Rectangle, and set it as immovable. |
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 |
PaddleRight
public PaddleRight(double width,
double height)
- Create a new Paddle as a Rectangle, and set it as immovable. The centroid
is set to be on the side of the paddle so that it can spin around the
centroid.
- Parameters:
width
- Width of paddleheight
- Height of paddle
moveUp
public void moveUp(MoveUpEvent e)
- Description copied from interface:
MoveListener
- Move the source Paddle up
- Specified by:
moveUp
in interface MoveListener
- Parameters:
e
- a reference to the Event
moveDown
public void moveDown(MoveDownEvent e)
- Description copied from interface:
MoveListener
- Move the source Paddle down
- Specified by:
moveDown
in interface MoveListener
- Parameters:
e
- a reference to the Event
collide
public void collide(PhysicalItem 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<PhysicalItem>
- Parameters:
otherObject
- that has collided with this object
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