vehicle
Class AutomaticRightMovingV

java.lang.Object
  |
  +--vehicle.AbstractVehicle
        |
        +--vehicle.BasicVehicle
              |
              +--vehicle.AutomaticRightMovingV

public class AutomaticRightMovingV
extends BasicVehicle

An AutoBasicVehicle demostrates the correct usage of the update() method to automatically update the state of this vehicle.
An AutoBasicVehicle will automatically move left to right on the world and return to the left side of the world once it passes the right side.


Field Summary
 
Fields inherited from class vehicle.BasicVehicle
 
Fields inherited from class vehicle.AbstractVehicle
mvTrack, theWorld
 
Constructor Summary
AutomaticRightMovingV(World theWorld)
          Creates a automatically moving vehicle
 
Method Summary
 void update()
          Called by World when it's time to update.
 
Methods inherited from class vehicle.BasicVehicle
createShapes, draw
 
Methods inherited from class vehicle.AbstractVehicle
getOrientation, getTracker, getX, getY, handleCollision, moveBy, moveTo, rotateBy, setOrientation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutomaticRightMovingV

public AutomaticRightMovingV(World theWorld)
Creates a automatically moving vehicle

Method Detail

update

public void update()
Called by World when it's time to update. Moves to the right by 1 unit.

Overrides:
update in class BasicVehicle