Class Player
java.lang.Object
Item
MovingItem
Player
- All Implemented Interfaces:
- java.io.Serializable
public class Player
- extends MovingItem
- See Also:
- Serialized Form
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 |
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
Player
public Player(Vector pos,
Environment env)
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