games.SpaceInvaders.items
Class Ship
java.lang.Object
vooga.gameEngine.game.GameRelatedObject
vooga.gameEngine.item.GameItem
vooga.gameEngine.item.BoundedItem
games.SpaceInvaders.items.Ship
- All Implemented Interfaces:
- ShipInputListener, java.io.Serializable, java.lang.Comparable<Renderable>, java.util.EventListener, Collidable<GameItem>, Renderable, Tangible, PositionChangeListener, RotationChangeListener, SizeChangeListener, TangibleListener, TimeListener
public class Ship
- extends BoundedItem
- implements TimeListener, Collidable<GameItem>, ShipInputListener
- Author:
- Justin C. Klaassen
- See Also:
- Serialized Form
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 |
Ship
public Ship(Texture t,
CameraController cc)
collide
public void collide(GameItem 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<GameItem>
- Parameters:
otherObject
- that has collided with this object
fireLaser
public void fireLaser(LaserInputEvent e)
- Specified by:
fireLaser
in interface ShipInputListener
startMoveLeft
public void startMoveLeft(StartLeftInputEvent e)
- Specified by:
startMoveLeft
in interface ShipInputListener
startMoveRight
public void startMoveRight(StartRightInputEvent e)
- Specified by:
startMoveRight
in interface ShipInputListener
endMoveLeft
public void endMoveLeft(EndLeftInputEvent e)
- Specified by:
endMoveLeft
in interface ShipInputListener
endMoveRight
public void endMoveRight(EndRightInputEvent e)
- Specified by:
endMoveRight
in interface ShipInputListener
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