Class Player

java.lang.Object
  extended by Item
      extended by MovingItem
          extended by Player
All Implemented Interfaces:
java.io.Serializable

public class Player
extends MovingItem

See Also:
Serialized Form

Field Summary
private  boolean isSprinting
           
private  Item itemHeld
           
 boolean MOVING_BACKWARD
           
 boolean MOVING_STRAFELEFT
           
 boolean MOVING_STRAFERIGHT
           
 boolean MOVING_STRAIGHT
           
 boolean MOVING_TURNLEFT
           
 boolean MOVING_TURNRIGHT
           
private  java.util.Stack pockets
           
 
Constructor Summary
Player(Vector pos, Environment env)
           
 
Method Summary
 void action()
           
 void allStop()
           
 void collideAction(Item other, Vector pos)
           
 void dropHeldItem()
           
 void getPocketedItem()
           
 boolean isSprinting()
           
 Item itemHeld()
           
 void pickUpItem(Item i)
           
 void pocketHeldItem()
           
 void setSprint(boolean b)
           
 void toImage(java.awt.Graphics g, Vector pos, double zoom)
           
 void useHeldItem()
           
 
Methods inherited from class MovingItem
checkIfTouching, checkIfTouching, classImage, direction, initialTurningSpeed, move, move, moveBackward, setDirection, setInitialTurningSpeed, setSpeed, setTurningSpeed, speed, strafeLeft, strafeRight, turn, turningSpeed, turnLeft, turnRight
 
Methods inherited from class Item
age, className, color, displacement, displacement, distanceFrom, distanceFrom, environment, image, incrementAge, isActive, isAlive, isEdible, isPortable, isPushable, isSolid, message, messageCounter, performSpecificFunction, position, radiusOfContact, reduceMessageCounter, remove, setActive, setAge, setColor, setEnvironment, setImage, setMessage, setPosition, setRadiusOfContact, showMessage, theCloser, touchingDistance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MOVING_STRAIGHT

public boolean MOVING_STRAIGHT

MOVING_STRAFERIGHT

public boolean MOVING_STRAFERIGHT

MOVING_STRAFELEFT

public boolean MOVING_STRAFELEFT

MOVING_BACKWARD

public boolean MOVING_BACKWARD

MOVING_TURNLEFT

public boolean MOVING_TURNLEFT

MOVING_TURNRIGHT

public boolean MOVING_TURNRIGHT

isSprinting

private boolean isSprinting

itemHeld

private Item itemHeld

pockets

private java.util.Stack pockets
Constructor Detail

Player

public Player(Vector pos,
              Environment env)
Method Detail

itemHeld

public Item itemHeld()

pickUpItem

public void pickUpItem(Item i)

dropHeldItem

public void dropHeldItem()

pocketHeldItem

public void pocketHeldItem()

useHeldItem

public void useHeldItem()

getPocketedItem

public void getPocketedItem()

collideAction

public void collideAction(Item other,
                          Vector pos)
Overrides:
collideAction in class MovingItem

action

public void action()
Overrides:
action in class Item

isSprinting

public boolean isSprinting()

setSprint

public void setSprint(boolean b)

allStop

public void allStop()

toImage

public void toImage(java.awt.Graphics g,
                    Vector pos,
                    double zoom)
Overrides:
toImage in class Item