Class DefaultShip

java.lang.Object
  |
  +--java.util.Observable
        |
        +--Body
              |
              +--Ship
                    |
                    +--DefaultShip
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RandomShip

public class DefaultShip
extends Ship

The default ship type of the game.

See Also:
Serialized Form

Inner classes inherited from class Ship
Ship.Fire
 
Inner classes inherited from class Body
Body.CollisionCheck, Body.CreatedLaterException, Body.DisabledException, Body.Projection
 
Fields inherited from class Body
angle, creation, id, movementX, movementY, player, positionX, positionY, radius, time, type
 
Constructor Summary
DefaultShip(int player, long when)
           
 
Method Summary
 void collision(Body threat, long when)
          Override this to do what is needed on actual collision.
protected  void destroy(long when)
          If a body such as a ship of laser beam wants to die a violent and spectacular death, this is the method to call.
protected  void fireOnce(long when)
          Fire weapon once.
 
Methods inherited from class Ship
deactivate, setAccelerating, setFiring, setFiringOff, setTurning
 
Methods inherited from class Body
activate, collisionCheck, collisionCheck, disable, enable, getAcceleration, getAngle, getId, getMaster, getPlayer, getRadius, getTime, getType, getX, getY, isAccelerating, project, setAcceleration, setAngleRate, update, updateComponents
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultShip

public DefaultShip(int player,
                   long when)
Method Detail

collision

public void collision(Body threat,
                      long when)
Description copied from class: Body
Override this to do what is needed on actual collision.
Overrides:
collision in class Body

fireOnce

protected void fireOnce(long when)
Description copied from class: Ship
Fire weapon once.
Overrides:
fireOnce in class Ship

destroy

protected void destroy(long when)
Description copied from class: Body
If a body such as a ship of laser beam wants to die a violent and spectacular death, this is the method to call. Overlay to cause more interesting violent death.
Overrides:
destroy in class Body